blob: 899cac624afa542088b9c61dd4153ceb9f329a3d [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001Disable automatic downloading of components!
2
3Upstream-Status: Inappropriate [disable feature]
4
5Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
6
7--- a/setup.py
8+++ b/setup.py
Andrew Geisslerc5535c92023-01-27 16:10:19 -06009@@ -303,7 +303,6 @@ setup( # Finally, pass this all along t
Andrew Geissler87f5cff2022-09-30 13:13:31 -050010 setup_requires=[
Andrew Geissler595f6302022-01-24 19:11:47 +000011 "certifi>=2020.06.20",
Andrew Geisslerc5535c92023-01-27 16:10:19 -060012 "numpy>=1.19",
13- "setuptools_scm>=7",
Andrew Geissler595f6302022-01-24 19:11:47 +000014 ],
15 install_requires=[
Andrew Geisslerc5535c92023-01-27 16:10:19 -060016 "contourpy>=1.0.1",
17@@ -315,13 +314,7 @@ setup( # Finally, pass this all along t
18 "pillow>=6.2.0",
19 "pyparsing>=2.2.1",
20 "python-dateutil>=2.7",
21- ] + (
22- # Installing from a git checkout that is not producing a wheel.
23- ["setuptools_scm>=7"] if (
24- Path(__file__).with_name(".git").exists() and
25- os.environ.get("CIBUILDWHEEL", "0") != "1"
26- ) else []
27- ),
28+ ],
29 use_scm_version={
30 "version_scheme": "release-branch-semver",
31 "local_scheme": "node-and-date",
Andrew Geissler595f6302022-01-24 19:11:47 +000032--- a/setupext.py
33+++ b/setupext.py
Andrew Geisslerc5535c92023-01-27 16:10:19 -060034@@ -65,40 +65,7 @@ def get_from_cache_or_download(url, sha)
Andrew Geissler595f6302022-01-24 19:11:47 +000035 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):