From 0e5ad72a077c18d43130fa3481c5b20099af7ecc Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 15 Nov 2024 00:32:50 +0100 Subject: [PATCH] Update 'Collect lockfiles' step --- .github/workflows/make_bundle_conda.yml | 2 +- build_installers.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/make_bundle_conda.yml b/.github/workflows/make_bundle_conda.yml index ab96e103..ab6b770c 100644 --- a/.github/workflows/make_bundle_conda.yml +++ b/.github/workflows/make_bundle_conda.yml @@ -470,7 +470,7 @@ jobs: path: ${{ env.LICENSES_ARTIFACT_PATH }} name: ${{ env.LICENSES_ARTIFACT_NAME }} - - name: Collect list of packages + - name: Collect lockfiles id: pkgs-list shell: bash -el {0} working-directory: napari-packaging diff --git a/build_installers.py b/build_installers.py index d64361d1..a3e8ac2c 100644 --- a/build_installers.py +++ b/build_installers.py @@ -437,15 +437,15 @@ def licenses(): return zipname.resolve() -def packages_list(): - txtfile = next(Path("_work").glob("pkg-list.napari-*.txt"), None) +def lockfiles(): + txtfile = next(Path("_work").glob("lockfile.napari-*.txt"), None) if not txtfile or not txtfile.is_file(): sys.exit( - "!! pkg-list.napari-*.txt not found." + "!! lockfile.napari-*.txt not found. " "Ensure 'construct.yaml' has a 'build_outputs' " - "key configured with 'pkgs_list'.", + "key configured with 'lockfile'.", ) - zipname = Path("_work") / f"pkg-list.{OS}-{ARCH}.zip" + zipname = Path("_work") / f"lockfile.{OS}-{ARCH}.zip" with zipfile.ZipFile(zipname, mode="w", compression=zipfile.ZIP_DEFLATED) as ozip: ozip.write(txtfile) return zipname.resolve() @@ -503,9 +503,9 @@ def cli(argv=None): "This must be run as a separate step.", ) p.add_argument( - "--pkgs-list", + "--lockfile", action="store_true", - help="Generate the list of packages used to build the napari environment." + help="Collect the installer-equivalent lockfiles. Run AFTER building the installer. " "This must be run as a separate step.", ) p.add_argument( @@ -542,8 +542,8 @@ def cli(argv=None): if args.licenses: print(licenses()) sys.exit() - if args.pkgs_list: - print(packages_list()) + if args.lockfile: + print(lockfiles()) sys.exit() if args.images: _generate_background_images(napari_repo=args.location)