mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-09-02 04:20:18 +00:00
Changes in oe-core commit a0151ab56cf3 (setuptools3: clean the build directory in configure) cause the build directory to be cleared during configure step. To avoid the downloaded sources from getting cleaned, pre-fetch them to a separate downloads/ directory and patch source to look there. Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
106 lines
3.7 KiB
Diff
106 lines
3.7 KiB
Diff
Disable automatic downloading of components!
|
|
|
|
Upstream-Status: Inappropriate [disable feature]
|
|
|
|
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
|
|
|
|
Update patch to fit on 3.7.2.
|
|
|
|
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
|
|
|
|
Update to look for downloads in downloads/ directoory instead of build.
|
|
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
|
|
|
|
diff --git a/setup.py b/setup.py
|
|
index 0bea13f..f39d8fc 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -327,13 +327,7 @@ setup( # Finally, pass this all along to setuptools to do the heavy lifting.
|
|
"pillow>=6.2.0",
|
|
"pyparsing>=2.3.1,<3.1",
|
|
"python-dateutil>=2.7",
|
|
- ] + (
|
|
- # Installing from a git checkout that is not producing a wheel.
|
|
- ["setuptools_scm>=7"] if (
|
|
- Path(__file__).with_name(".git").exists() and
|
|
- os.environ.get("CIBUILDWHEEL", "0") != "1"
|
|
- ) else []
|
|
- ),
|
|
+ ],
|
|
extras_require={
|
|
':python_version<"3.10"': [
|
|
"importlib-resources>=3.2.0",
|
|
diff --git a/setupext.py b/setupext.py
|
|
index a898d64..9a4bb85 100644
|
|
--- a/setupext.py
|
|
+++ b/setupext.py
|
|
@@ -66,40 +66,7 @@ def get_from_cache_or_download(url, sha):
|
|
BytesIO
|
|
The file loaded into memory.
|
|
"""
|
|
- cache_dir = _get_xdg_cache_dir()
|
|
-
|
|
- if cache_dir is not None: # Try to read from cache.
|
|
- try:
|
|
- data = (cache_dir / sha).read_bytes()
|
|
- except IOError:
|
|
- pass
|
|
- else:
|
|
- if _get_hash(data) == sha:
|
|
- return BytesIO(data)
|
|
-
|
|
- # jQueryUI's website blocks direct downloads from urllib.request's
|
|
- # default User-Agent, but not (for example) wget; so I don't feel too
|
|
- # bad passing in an empty User-Agent.
|
|
- with urllib.request.urlopen(
|
|
- urllib.request.Request(url, headers={"User-Agent": ""}),
|
|
- context=_get_ssl_context()) as req:
|
|
- data = req.read()
|
|
-
|
|
- file_sha = _get_hash(data)
|
|
- if file_sha != sha:
|
|
- raise Exception(
|
|
- f"The downloaded file does not match the expected sha. {url} was "
|
|
- f"expected to have {sha} but it had {file_sha}")
|
|
-
|
|
- if cache_dir is not None: # Try to cache the downloaded file.
|
|
- try:
|
|
- cache_dir.mkdir(parents=True, exist_ok=True)
|
|
- with open(cache_dir / sha, "xb") as fout:
|
|
- fout.write(data)
|
|
- except IOError:
|
|
- pass
|
|
-
|
|
- return BytesIO(data)
|
|
+ raise IOError(f"Automatic downloading is disabled.")
|
|
|
|
|
|
def get_and_extract_tarball(urls, sha, dirname):
|
|
@@ -117,7 +84,7 @@ def get_and_extract_tarball(urls, sha, dirname):
|
|
dirname : path-like
|
|
Directory where the tarball is extracted.
|
|
"""
|
|
- toplevel = Path("build", dirname)
|
|
+ toplevel = Path("downloads", dirname)
|
|
if not toplevel.exists(): # Download it or load it from cache.
|
|
try:
|
|
import certifi # noqa
|
|
@@ -677,7 +644,7 @@ class FreeType(SetupPackage):
|
|
else:
|
|
msbuild_platform = 'Win32'
|
|
base_path = Path(
|
|
- f"build/freetype-{LOCAL_FREETYPE_VERSION}/builds/windows"
|
|
+ f"downloads/freetype-{LOCAL_FREETYPE_VERSION}/builds/windows"
|
|
)
|
|
vc = 'vc2010'
|
|
sln_path = base_path / vc / "freetype.sln"
|
|
@@ -775,7 +742,7 @@ class Qhull(SetupPackage):
|
|
shutil.copyfile(toplevel / "COPYING.txt", "LICENSE/LICENSE_QHULL")
|
|
|
|
for ext in self._extensions_to_update:
|
|
- qhull_path = Path(f'build/qhull-{LOCAL_QHULL_VERSION}/src')
|
|
+ qhull_path = Path(f'downloads/qhull-{LOCAL_QHULL_VERSION}/src')
|
|
ext.include_dirs.insert(0, str(qhull_path))
|
|
ext.sources.extend(
|
|
map(str, sorted(qhull_path.glob('libqhull_r/*.c'))))
|