Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constrain dependencies in installer's base env more strictly #187

Merged
merged 5 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/make_bundle_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
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'))"
Expand All @@ -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'))"
Expand All @@ -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'))"
19 changes: 11 additions & 8 deletions build_installers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@
else:
raise RuntimeError(f"Unrecognized OS: {sys.platform}")

CONDA_TOOL_DEPS = (
"conda >=23.10",
"conda-libmamba-solver",
"mamba",
"pip",
)


def _use_local():
"""
Expand Down Expand Up @@ -215,9 +222,7 @@ def _base_env(python_version=PY_VER):
],
"specs": [
f"python={python_version}.*=*_cpython",
"conda",
"mamba",
"pip",
*CONDA_TOOL_DEPS,
],
}

Expand All @@ -237,11 +242,9 @@ def _napari_env(
f"napari-menu={napari_version}",
"napari-plugin-manager",
f"pyside2={pyside_version}",
"conda",
"mamba",
"pip",
]
+ (extra_specs or []),
*CONDA_TOOL_DEPS,
*(extra_specs or ()),
],
# "exclude": exclude, # TODO: not supported yet in constructor
}

Expand Down