Skip to content

Commit

Permalink
Update 'Collect lockfiles' step
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Nov 14, 2024
1 parent 06d2588 commit 0e5ad72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/make_bundle_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions build_installers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0e5ad72

Please sign in to comment.