diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch b/meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch deleted file mode 100644 index aea8f62ea7..0000000000 --- a/meta-python/recipes-devtools/python/python3-matplotlib/matplotlib-disable-download.patch +++ /dev/null | |||
| @@ -1,75 +0,0 @@ | |||
| 1 | Disable automatic downloading of components! | ||
| 2 | |||
| 3 | Upstream-Status: Inappropriate [disable feature] | ||
| 4 | |||
| 5 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | ||
| 6 | |||
| 7 | Update patch to fit on 3.7.2. | ||
| 8 | |||
| 9 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
| 10 | |||
| 11 | diff --git a/setup.py b/setup.py | ||
| 12 | index 0bea13fa6f..f39d8fc871 100644 | ||
| 13 | --- a/setup.py | ||
| 14 | +++ b/setup.py | ||
| 15 | @@ -327,13 +327,7 @@ setup( # Finally, pass this all along to setuptools to do the heavy lifting. | ||
| 16 | "pillow>=6.2.0", | ||
| 17 | "pyparsing>=2.3.1,<3.1", | ||
| 18 | "python-dateutil>=2.7", | ||
| 19 | - ] + ( | ||
| 20 | - # Installing from a git checkout that is not producing a wheel. | ||
| 21 | - ["setuptools_scm>=7"] if ( | ||
| 22 | - Path(__file__).with_name(".git").exists() and | ||
| 23 | - os.environ.get("CIBUILDWHEEL", "0") != "1" | ||
| 24 | - ) else [] | ||
| 25 | - ), | ||
| 26 | + ], | ||
| 27 | extras_require={ | ||
| 28 | ':python_version<"3.10"': [ | ||
| 29 | "importlib-resources>=3.2.0", | ||
| 30 | diff --git a/setupext.py b/setupext.py | ||
| 31 | index a898d642d6..474172ff8f 100644 | ||
| 32 | --- a/setupext.py | ||
| 33 | +++ b/setupext.py | ||
| 34 | @@ -66,40 +66,7 @@ def get_from_cache_or_download(url, sha): | ||
| 35 | BytesIO | ||
| 36 | The file loaded into memory. | ||
| 37 | """ | ||
| 38 | - cache_dir = _get_xdg_cache_dir() | ||
| 39 | - | ||
| 40 | - if cache_dir is not None: # Try to read from cache. | ||
| 41 | - try: | ||
| 42 | - data = (cache_dir / sha).read_bytes() | ||
| 43 | - except IOError: | ||
| 44 | - pass | ||
| 45 | - else: | ||
| 46 | - if _get_hash(data) == sha: | ||
| 47 | - return BytesIO(data) | ||
| 48 | - | ||
| 49 | - # jQueryUI's website blocks direct downloads from urllib.request's | ||
| 50 | - # default User-Agent, but not (for example) wget; so I don't feel too | ||
| 51 | - # bad passing in an empty User-Agent. | ||
| 52 | - with urllib.request.urlopen( | ||
| 53 | - urllib.request.Request(url, headers={"User-Agent": ""}), | ||
| 54 | - context=_get_ssl_context()) as req: | ||
| 55 | - data = req.read() | ||
| 56 | - | ||
| 57 | - file_sha = _get_hash(data) | ||
| 58 | - if file_sha != sha: | ||
| 59 | - raise Exception( | ||
| 60 | - f"The downloaded file does not match the expected sha. {url} was " | ||
| 61 | - f"expected to have {sha} but it had {file_sha}") | ||
| 62 | - | ||
| 63 | - if cache_dir is not None: # Try to cache the downloaded file. | ||
| 64 | - try: | ||
| 65 | - cache_dir.mkdir(parents=True, exist_ok=True) | ||
| 66 | - with open(cache_dir / sha, "xb") as fout: | ||
| 67 | - fout.write(data) | ||
| 68 | - except IOError: | ||
| 69 | - pass | ||
| 70 | - | ||
| 71 | - return BytesIO(data) | ||
| 72 | + raise IOError(f"Automatic downloading is disabled.") | ||
| 73 | |||
| 74 | |||
| 75 | def get_and_extract_tarball(urls, sha, dirname): | ||
