From 5a01c15c9f279d5d7b20c91ed9b6654349ef74de Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 30 Sep 2024 12:39:29 +0200 Subject: [PATCH 1/5] Fix base env dependencies --- build_installers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build_installers.py b/build_installers.py index 75b2d67e..424a5b9e 100644 --- a/build_installers.py +++ b/build_installers.py @@ -215,8 +215,9 @@ def _base_env(python_version=PY_VER): ], "specs": [ f"python={python_version}.*=*_cpython", - "conda", - "mamba", + "conda >=23.10", + "conda-libmamba-solver", + "mamba <2.0a0", "pip", ], } From 092428fb52d36ca1b7112341791def6a7d7ebb2c Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 30 Sep 2024 12:42:09 +0200 Subject: [PATCH 2/5] add more tests --- .github/workflows/make_bundle_conda.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/make_bundle_conda.yml b/.github/workflows/make_bundle_conda.yml index 80e3f831..dda76d86 100644 --- a/.github/workflows/make_bundle_conda.yml +++ b/.github/workflows/make_bundle_conda.yml @@ -547,8 +547,11 @@ jobs: bash napari-${{ env.version }}-${{ runner.os }}-${{ env.arch-suffix }}.${{ env.extension }} -bfp "${{ runner.temp }}/napari-${{ env.version }}" . "${{ runner.temp }}/napari-${{ env.version }}/etc/profile.d/conda.sh" conda activate "${{ runner.temp }}/napari-${{ env.version }}/envs/napari-${{ env.version }}" + conda info conda config --show-sources conda config --show + conda list -p "${{ runner.temp }}/napari-${{ env.version }}/envs/napari-${{ env.version }}" + conda list -p "${{ runner.temp }}/napari-${{ env.version }}" xvfb-run --auto-servernum napari --info # Test shortcut python -c "import pathlib as p; assert list(p.Path('~/.local/share/applications/').expanduser().glob('napari*.desktop'))" @@ -563,8 +566,11 @@ jobs: installer -pkg napari-${{ env.version }}-${{ runner.os }}-${{ env.arch-suffix }}.${{ env.extension }} -target CurrentUserHomeDirectory -dumplog . "/Users/runner/Library/napari-${{ env.version }}/etc/profile.d/conda.sh" conda activate "/Users/runner/Library/napari-${{ env.version }}/envs/napari-${{ env.version }}" + conda info conda config --show-sources conda config --show + conda list -p "/Users/runner/Library/napari-${{ env.version }}" + conda list -p "/Users/runner/Library/napari-${{ env.version }}/envs/napari-${{ env.version }}" napari --info # Test shortcut python -c "import pathlib as p; assert list(p.Path('~/Applications').expanduser().glob('napari*.app'))" @@ -578,8 +584,11 @@ jobs: run: | cmd.exe /c start /wait napari-${{ env.version }}-${{ runner.os }}-${{ env.arch-suffix }}.${{ env.extension }} /S /D=${{ runner.temp }}\napari-${{ env.version }} CALL ${{ runner.temp }}\napari-${{ env.version }}\Scripts\activate ${{ runner.temp }}\napari-${{ env.version }}\envs\napari-${{ env.version }} + CALL conda info CALL conda config --show-sources CALL conda config --show + CALL conda list -p ${{ runner.temp }}\napari-${{ env.version }} + CALL conda list -p ${{ runner.temp }}\napari-${{ env.version }}\envs\napari-${{ env.version }} napari --info :: Test shortcut python -c "import pathlib as p; assert list(p.Path('%PROGRAMDATA%\\Microsoft\\Windows\\Start Menu\\Programs').glob('napari*\\napari*.lnk'))" From 564d043fee47bbb7e5f0e90b93be6ced1d2428cd Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 30 Sep 2024 13:01:54 +0200 Subject: [PATCH 3/5] pin in the napari env too --- .github/workflows/make_bundle_conda.yml | 2 +- build_installers.py | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/make_bundle_conda.yml b/.github/workflows/make_bundle_conda.yml index dda76d86..4c191bcf 100644 --- a/.github/workflows/make_bundle_conda.yml +++ b/.github/workflows/make_bundle_conda.yml @@ -550,8 +550,8 @@ jobs: conda info conda config --show-sources conda config --show - conda list -p "${{ runner.temp }}/napari-${{ env.version }}/envs/napari-${{ env.version }}" conda list -p "${{ runner.temp }}/napari-${{ env.version }}" + conda list -p "${{ runner.temp }}/napari-${{ env.version }}/envs/napari-${{ env.version }}" xvfb-run --auto-servernum napari --info # Test shortcut python -c "import pathlib as p; assert list(p.Path('~/.local/share/applications/').expanduser().glob('napari*.desktop'))" diff --git a/build_installers.py b/build_installers.py index 424a5b9e..d4e3ef47 100644 --- a/build_installers.py +++ b/build_installers.py @@ -99,6 +99,13 @@ else: raise RuntimeError(f"Unrecognized OS: {sys.platform}") +CONDA_TOOL_DEPS = ( + "conda >=23.10", + "conda-libmamba-solver", + "mamba <2.0a0", + "pip", +) + def _use_local(): """ @@ -215,10 +222,7 @@ def _base_env(python_version=PY_VER): ], "specs": [ f"python={python_version}.*=*_cpython", - "conda >=23.10", - "conda-libmamba-solver", - "mamba <2.0a0", - "pip", + *CONDA_TOOL_DEPS, ], } @@ -238,11 +242,9 @@ def _napari_env( f"napari-menu={napari_version}", "napari-plugin-manager", f"pyside2={pyside_version}", - "conda", - "mamba", - "pip", + *CONDA_TOOL_DEPS, + *(extra_specs or ()), ] - + (extra_specs or []), # "exclude": exclude, # TODO: not supported yet in constructor } From 9cda47c1a8f6f424e7f2a0bcc0fad3c8c5d4ded7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:02:07 +0000 Subject: [PATCH 4/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- build_installers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_installers.py b/build_installers.py index d4e3ef47..32191841 100644 --- a/build_installers.py +++ b/build_installers.py @@ -244,7 +244,7 @@ def _napari_env( f"pyside2={pyside_version}", *CONDA_TOOL_DEPS, *(extra_specs or ()), - ] + ], # "exclude": exclude, # TODO: not supported yet in constructor } From db2da9229c7e0de45b1dbf569f9e342d403df66e Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 30 Sep 2024 14:25:42 +0200 Subject: [PATCH 5/5] Do not pin mamba --- build_installers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_installers.py b/build_installers.py index 32191841..8a7e52ab 100644 --- a/build_installers.py +++ b/build_installers.py @@ -102,7 +102,7 @@ CONDA_TOOL_DEPS = ( "conda >=23.10", "conda-libmamba-solver", - "mamba <2.0a0", + "mamba", "pip", )