Skip to content

Commit

Permalink
Fix pinning packages workflow by remove speccial pinning from macOS a…
Browse files Browse the repository at this point in the history
…nd add special for Windows (napari#7119)

# References and relevant issues
fix failing napari#7045

# Description

Since 2024 July 1 there are wheels for PyQt5-Qt5, not only for macOS,
but also for linux https://pypi.org/project/PyQt5-Qt5/#files

It means that our pinning, that is calculated on linux, no longer works
for windows runners.

This PR removes the special case for macOS, and introduce it for
Windows.

---------

Co-authored-by: Peter Sobolewski <[email protected]>
  • Loading branch information
Czaki and psobolewskiPhD authored Jul 23, 2024
1 parent b54aa89 commit 3d3cfd5
Show file tree
Hide file tree
Showing 10 changed files with 278 additions and 278 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/reusable_run_tox_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ jobs:
PYVISTA_OFF_SCREEN: True
MIN_REQ: ${{ inputs.min_req }}
FORCE_COLOR: 1
PIP_CONSTRAINT: ${{ github.workspace }}/resources/constraints/constraints_py${{ inputs.python_version }}${{ (((inputs.platform == 'macos-latest') && '_macos_arm') || '') }}${{ inputs.min_req && '_min_req' }}${{ inputs.constraints_suffix }}.txt
UV_CONSTRAINT: ${{ github.workspace }}/resources/constraints/constraints_py${{ inputs.python_version }}${{ (((inputs.platform == 'macos-latest') && '_macos_arm') || '') }}${{ inputs.min_req && '_min_req' }}${{ inputs.constraints_suffix }}.txt
PIP_CONSTRAINT: ${{ github.workspace }}/resources/constraints/constraints_py${{ inputs.python_version }}${{ ((startsWith(inputs.platform, 'windows') && '_windows') || '') }}${{ inputs.min_req && '_min_req' }}${{ inputs.constraints_suffix }}.txt
UV_CONSTRAINT: ${{ github.workspace }}/resources/constraints/constraints_py${{ inputs.python_version }}${{ ((startsWith(inputs.platform, 'windows') && '_windows') || '') }}${{ inputs.min_req && '_min_req' }}${{ inputs.constraints_suffix }}.txt
# Above we calculate path to constraints file based on python version and platform
# Because there is no single PyQt5-Qt5 package version available for all platforms we was forced to use
# different constraints files for macOS arm and other platforms
# different constraints files for Windows. An example with macOS arm64:
# ${{ (((inputs.platform == 'macos-latest') && '_macos_arm') || '') }} - if platform is macOS-latest then add '_macos_arm' to constraints file name, else add nothing
# ${{ inputs.min_req && '_min_req' }} - if min_req is set then add '_min_req' to constraints file name, else add nothing
# ${{ inputs.constraints_suffix }} - additional suffix for constraints file name (used for example testing).
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade_test_constraints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:
for pyv in 3.9 3.10 3.11 3.12; do
uv pip compile --python-version ${pyv} --upgrade --output-file $constraints/constraints_py${pyv}.txt $pyproject_toml $constraints/version_denylist.txt "${flags[@]}"
uv pip compile --python-version ${pyv} --upgrade --output-file $constraints/constraints_py${pyv}_pydantic_1.txt $pyproject_toml $constraints/version_denylist.txt $constraints/pydantic_le_2.txt "${flags[@]}"
uv pip compile --python-platform aarch64-apple-darwin --python-version ${pyv} --upgrade --output-file $constraints/constraints_py${pyv}_macos_arm.txt $pyproject_toml $constraints/version_denylist.txt "${flags[@]}"
uv pip compile --python-platform windows --python-version ${pyv} --upgrade --output-file $constraints/constraints_py${pyv}_windows.txt $pyproject_toml $constraints/version_denylist.txt "${flags[@]}"
done
Expand Down
62 changes: 15 additions & 47 deletions resources/constraints/constraints_py3.10.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --python-version 3.10 --output-file napari_repo/resources/constraints/constraints_py3.10.txt napari_repo/pyproject.toml napari_repo/resources/constraints/version_denylist.txt --extra pyqt5 --extra pyqt6_experimental --extra pyside2 --extra pyside6_experimental --extra testing --extra testing_extra --extra optional
# uv pip compile --python-platform aarch64-apple-darwin --python-version 3.10 --output-file napari_repo/resources/constraints/constraints_py3.10_macos_arm.txt napari_repo/pyproject.toml napari_repo/resources/constraints/version_denylist.txt --extra pyqt5 --extra pyqt6_experimental --extra pyside2 --extra pyside6_experimental --extra testing --extra testing_extra --extra optional
alabaster==0.7.16
# via sphinx
annotated-types==0.7.0
Expand All @@ -11,6 +11,8 @@ appdirs==1.4.4
# napari (napari_repo/pyproject.toml)
# npe2
# pint
appnope==0.1.4
# via ipykernel
asciitree==0.3.3
# via zarr
asttokens==2.4.1
Expand Down Expand Up @@ -76,7 +78,6 @@ fasteners==0.19
filelock==3.15.4
# via
# torch
# triton
# virtualenv
flexcache==0.3
# via pint
Expand Down Expand Up @@ -220,43 +221,11 @@ numpy==2.0.0
# scipy
# tensorstore
# tifffile
# triangle
# vispy
# xarray
# zarr
numpydoc==1.7.0
# via napari (napari_repo/pyproject.toml)
nvidia-cublas-cu12==12.1.3.1
# via
# nvidia-cudnn-cu12
# nvidia-cusolver-cu12
# torch
nvidia-cuda-cupti-cu12==12.1.105
# via torch
nvidia-cuda-nvrtc-cu12==12.1.105
# via torch
nvidia-cuda-runtime-cu12==12.1.105
# via torch
nvidia-cudnn-cu12==8.9.2.26
# via torch
nvidia-cufft-cu12==11.0.2.54
# via torch
nvidia-curand-cu12==10.3.2.106
# via torch
nvidia-cusolver-cu12==11.4.5.107
# via torch
nvidia-cusparse-cu12==12.1.0.106
# via
# nvidia-cusolver-cu12
# torch
nvidia-nccl-cu12==2.20.5
# via torch
nvidia-nvjitlink-cu12==12.5.40
# via
# nvidia-cusolver-cu12
# nvidia-cusparse-cu12
nvidia-nvtx-cu12==12.1.105
# via torch
packaging==24.1
# via
# build
Expand Down Expand Up @@ -350,6 +319,15 @@ pygments==2.18.0
# superqt
pymsgbox==1.0.9
# via pyautogui
pyobjc-core==10.3.1
# via
# pyautogui
# pyobjc-framework-cocoa
# pyobjc-framework-quartz
pyobjc-framework-cocoa==10.3.1
# via pyobjc-framework-quartz
pyobjc-framework-quartz==10.3.1
# via pyautogui
pyopengl==3.1.6
# via
# -r napari_repo/resources/constraints/version_denylist.txt
Expand All @@ -362,7 +340,7 @@ pyproject-hooks==1.1.0
# via build
pyqt5==5.15.10
# via napari (napari_repo/pyproject.toml)
pyqt5-qt5==5.15.2
pyqt5-qt5==5.15.14
# via pyqt5
pyqt5-sip==12.13.0
# via pyqt5
Expand All @@ -376,8 +354,6 @@ pyrect==0.2.0
# via pygetwindow
pyscreeze==0.1.30
# via pyautogui
pyside2==5.15.2.1
# via napari (napari_repo/pyproject.toml)
pyside6==6.4.2
# via
# -r napari_repo/resources/constraints/version_denylist.txt
Expand Down Expand Up @@ -411,10 +387,6 @@ python-dateutil==2.9.0.post0
# jupyter-client
# matplotlib
# pandas
python3-xlib==0.15
# via
# mouseinfo
# pyautogui
pytweening==1.2.0
# via pyautogui
pytz==2024.1
Expand Down Expand Up @@ -460,6 +432,8 @@ rpds-py==0.18.1
# via
# jsonschema
# referencing
rubicon-objc==0.4.9
# via mouseinfo
scikit-image==0.24.0
# via napari (napari_repo/pyproject.toml)
scipy==1.13.1
Expand All @@ -468,8 +442,6 @@ scipy==1.13.1
# scikit-image
shellingham==1.5.4
# via typer
shiboken2==5.15.2.1
# via pyside2
shiboken6==6.4.2
# via
# pyside6
Expand Down Expand Up @@ -548,10 +520,6 @@ traitlets==5.14.3
# jupyter-core
# matplotlib-inline
# qtconsole
triangle==20230923
# via napari (napari_repo/pyproject.toml)
triton==2.3.1
# via torch
typer==0.12.3
# via npe2
typing-extensions==4.12.2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --python-platform aarch64-apple-darwin --python-version 3.12 --output-file napari_repo/resources/constraints/constraints_py3.12_macos_arm.txt napari_repo/pyproject.toml napari_repo/resources/constraints/version_denylist.txt --extra pyqt5 --extra pyqt6_experimental --extra pyside2 --extra pyside6_experimental --extra testing --extra testing_extra --extra optional
# uv pip compile --python-version 3.10 --output-file napari_repo/resources/constraints/constraints_py3.10.txt napari_repo/pyproject.toml napari_repo/resources/constraints/version_denylist.txt --extra pyqt5 --extra pyqt6_experimental --extra pyside2 --extra pyside6_experimental --extra testing --extra testing_extra --extra optional
alabaster==0.7.16
# via sphinx
annotated-types==0.7.0
Expand All @@ -11,8 +11,6 @@ appdirs==1.4.4
# napari (napari_repo/pyproject.toml)
# npe2
# pint
appnope==0.1.4
# via ipykernel
asciitree==0.3.3
# via zarr
asttokens==2.4.1
Expand Down Expand Up @@ -66,13 +64,19 @@ docstring-parser==0.16
# magicgui
docutils==0.21.2
# via sphinx
exceptiongroup==1.2.1
# via
# hypothesis
# ipython
# pytest
executing==2.0.1
# via stack-data
fasteners==0.19
# via zarr
filelock==3.15.4
# via
# torch
# triton
# virtualenv
flexcache==0.3
# via pint
Expand Down Expand Up @@ -102,6 +106,10 @@ imageio==2.34.1
# scikit-image
imagesize==1.4.1
# via sphinx
importlib-metadata==7.2.1
# via
# build
# dask
in-n-out==0.2.1
# via app-model
iniconfig==2.0.0
Expand Down Expand Up @@ -212,11 +220,43 @@ numpy==2.0.0
# scipy
# tensorstore
# tifffile
# triangle
# vispy
# xarray
# zarr
numpydoc==1.7.0
# via napari (napari_repo/pyproject.toml)
nvidia-cublas-cu12==12.1.3.1
# via
# nvidia-cudnn-cu12
# nvidia-cusolver-cu12
# torch
nvidia-cuda-cupti-cu12==12.1.105
# via torch
nvidia-cuda-nvrtc-cu12==12.1.105
# via torch
nvidia-cuda-runtime-cu12==12.1.105
# via torch
nvidia-cudnn-cu12==8.9.2.26
# via torch
nvidia-cufft-cu12==11.0.2.54
# via torch
nvidia-curand-cu12==10.3.2.106
# via torch
nvidia-cusolver-cu12==11.4.5.107
# via torch
nvidia-cusparse-cu12==12.1.0.106
# via
# nvidia-cusolver-cu12
# torch
nvidia-nccl-cu12==2.20.5
# via torch
nvidia-nvjitlink-cu12==12.5.40
# via
# nvidia-cusolver-cu12
# nvidia-cusparse-cu12
nvidia-nvtx-cu12==12.1.105
# via torch
packaging==24.1
# via
# build
Expand Down Expand Up @@ -247,6 +287,7 @@ pillow==10.3.0
# napari (napari_repo/pyproject.toml)
# imageio
# matplotlib
# pyscreeze
# scikit-image
pint==0.24
# via napari (napari_repo/pyproject.toml)
Expand Down Expand Up @@ -309,15 +350,6 @@ pygments==2.18.0
# superqt
pymsgbox==1.0.9
# via pyautogui
pyobjc-core==10.3.1
# via
# pyautogui
# pyobjc-framework-cocoa
# pyobjc-framework-quartz
pyobjc-framework-cocoa==10.3.1
# via pyobjc-framework-quartz
pyobjc-framework-quartz==10.3.1
# via pyautogui
pyopengl==3.1.6
# via
# -r napari_repo/resources/constraints/version_denylist.txt
Expand All @@ -330,7 +362,7 @@ pyproject-hooks==1.1.0
# via build
pyqt5==5.15.10
# via napari (napari_repo/pyproject.toml)
pyqt5-qt5==5.15.14
pyqt5-qt5==5.15.2
# via pyqt5
pyqt5-sip==12.13.0
# via pyqt5
Expand All @@ -344,6 +376,18 @@ pyrect==0.2.0
# via pygetwindow
pyscreeze==0.1.30
# via pyautogui
pyside2==5.15.2.1
# via napari (napari_repo/pyproject.toml)
pyside6==6.4.2
# via
# -r napari_repo/resources/constraints/version_denylist.txt
# napari (napari_repo/pyproject.toml)
pyside6-addons==6.4.2
# via pyside6
pyside6-essentials==6.4.2
# via
# pyside6
# pyside6-addons
pytest==8.2.2
# via
# napari (napari_repo/pyproject.toml)
Expand All @@ -367,6 +411,10 @@ python-dateutil==2.9.0.post0
# jupyter-client
# matplotlib
# pandas
python3-xlib==0.15
# via
# mouseinfo
# pyautogui
pytweening==1.2.0
# via pyautogui
pytz==2024.1
Expand Down Expand Up @@ -412,8 +460,6 @@ rpds-py==0.18.1
# via
# jsonschema
# referencing
rubicon-objc==0.4.9
# via mouseinfo
scikit-image==0.24.0
# via napari (napari_repo/pyproject.toml)
scipy==1.13.1
Expand All @@ -422,6 +468,13 @@ scipy==1.13.1
# scikit-image
shellingham==1.5.4
# via typer
shiboken2==5.15.2.1
# via pyside2
shiboken6==6.4.2
# via
# pyside6
# pyside6-addons
# pyside6-essentials
six==1.16.0
# via
# asttokens
Expand Down Expand Up @@ -463,6 +516,14 @@ tifffile==2024.6.18
# via
# napari (napari_repo/pyproject.toml)
# scikit-image
tomli==2.0.1
# via
# build
# coverage
# npe2
# numpydoc
# pytest
# sphinx
tomli-w==1.0.0
# via npe2
toolz==0.12.1
Expand All @@ -487,6 +548,10 @@ traitlets==5.14.3
# jupyter-core
# matplotlib-inline
# qtconsole
triangle==20230923
# via napari (napari_repo/pyproject.toml)
triton==2.3.1
# via torch
typer==0.12.3
# via npe2
typing-extensions==4.12.2
Expand All @@ -495,6 +560,7 @@ typing-extensions==4.12.2
# app-model
# flexcache
# flexparser
# ipython
# magicgui
# pint
# pydantic
Expand All @@ -520,3 +586,5 @@ xarray==2024.6.0
# via napari (napari_repo/pyproject.toml)
zarr==2.18.2
# via napari (napari_repo/pyproject.toml)
zipp==3.19.2
# via importlib-metadata
Loading

0 comments on commit 3d3cfd5

Please sign in to comment.