From 933d34ec35e3efd9bb68f5bfbd817911280b4280 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Sat, 4 Sep 2021 16:41:13 -0700 Subject: [PATCH] build: Skip Python install when fetching macOS deps --- scripts/download-macos-libs.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/download-macos-libs.py b/scripts/download-macos-libs.py index b5fc51a1aa..8ede2402f7 100755 --- a/scripts/download-macos-libs.py +++ b/scripts/download-macos-libs.py @@ -84,10 +84,17 @@ class LibInstaller: f'-signature "{sig_path}" "{pkg_path}"', shell=True, check=True) + def is_pkg_skipped(self, pkg_name): + return pkg_name.startswith('python') + def install_pkg(self, pkg_name): if self.is_pkg_installed(pkg_name): return + if self.is_pkg_skipped(pkg_name): + print(f'[*] Skipping package {pkg_name}') + return + print(f'[*] Fetching {pkg_name}') pkg_filename, pkg_url = self.get_latest_pkg_filename_url(pkg_name) pkg_version = re.match(r'^[\w_]+-([\w\.\-\_\+]*?)\.' + self._darwin_target, pkg_filename).groups(1)[0] @@ -109,10 +116,6 @@ class LibInstaller: print(f' [>] {dep}') dep = dep.split('-')[0] self._queue.append(dep) - for dep in re.findall(r'@pkgdep (.+)', pkg_contents_file): - print(f' [>] {dep}') - dep = dep.split('-')[0] - self._queue.append(dep) print(f' [*] Checking tarball...') @@ -124,6 +127,7 @@ class LibInstaller: tb.extractall(self._extract_path, numeric_owner=True) for fpath in tb.getnames(): + # FIXME: Symlinks extracted_path = os.path.realpath(os.path.join(self._extract_path, fpath)) if extracted_path.endswith('.pc'): print(f' [*] Fixing {extracted_path}')