Skip to content

CI: replace quansight-labs/setup-python with astral-sh/setup-uv #28181

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

Merged
merged 4 commits into from
Jan 24, 2025
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
3 changes: 2 additions & 1 deletion .github/meson_actions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ runs:
TERM: xterm-256color
run: |
echo "::group::Installing Test Dependencies"
pip install pytest pytest-xdist pytest-timeout hypothesis typing_extensions setuptools
pip install pytest pytest-xdist pytest-timeout hypothesis typing_extensions
pip install -r requirements/setuptools_requirement.txt
echo "::endgroup::"
echo "::group::Test NumPy"
spin test -- --durations=10 --timeout=600
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ jobs:
persist-credentials: false
- name: 'Dependency Review'
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
with:
allow-ghsas: GHSA-cx63-2mw6-8hw5
5 changes: 4 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ jobs:
submodules: recursive
fetch-tags: true
persist-credentials: false
- uses: quansight-labs/setup-python@b9ab292c751a42bcd2bb465b7fa202ea2c3f5796 # v5.3.1
- uses: astral-sh/setup-uv@b5f58b2abc5763ade55e4e9d0fe52cd1ff7979ca
with:
python-version: ${{ matrix.version }}
enable-cache: false
- run:
uv pip install --python=${{ matrix.version }} pip
# TODO: remove cython nightly install when cython does a release
- name: Install nightly Cython
if: matrix.version == '3.13t'
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
- maintenance/**


permissions:
contents: read # to fetch code (actions/checkout)

Expand Down Expand Up @@ -123,9 +124,13 @@ jobs:
fetch-tags: true
persist-credentials: false

- uses: quansight-labs/setup-python@b9ab292c751a42bcd2bb465b7fa202ea2c3f5796 # v5.3.1
- uses: astral-sh/setup-uv@b5f58b2abc5763ade55e4e9d0fe52cd1ff7979ca
with:
python-version: ${{ matrix.version }}
enable-cache: false

- run:
uv pip install --python=${{ matrix.version }} pip

- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
if: ${{ matrix.build_runner[0] == 'macos-13' }}
Expand All @@ -141,6 +146,7 @@ jobs:
- name: Install dependencies
run: |
pip install -r requirements/build_requirements.txt
pip install -r requirements/setuptools_requirement.txt
pip install pytest pytest-xdist pytest-timeout hypothesis

- name: Build against Accelerate (LP64)
Expand All @@ -151,7 +157,7 @@ jobs:

- name: Build NumPy against Accelerate (ILP64)
run: |
git clean -xdf
rm -r build build-install
spin build -- -Duse-ilp64=true -Ddisable-optimization=true -Dallow-noblas=false

- name: Test (fast tests)
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ jobs:
persist-credentials: false

- name: Setup Python
uses: quansight-labs/setup-python@b9ab292c751a42bcd2bb465b7fa202ea2c3f5796 # v5.3.1
uses: astral-sh/setup-uv@b5f58b2abc5763ade55e4e9d0fe52cd1ff7979ca
with:
python-version: ${{ matrix.compiler-pyversion[1] }}
enable-cache: false

- run:
uv pip install --python=${{ matrix.version }} pip

# TODO: remove cython nightly install when cython does a release
- name: Install nightly Cython
Expand All @@ -47,7 +51,7 @@ jobs:

- name: Install build dependencies from PyPI
run: |
python -m pip install -r requirements/build_requirements.txt
pip install -r requirements/build_requirements.txt

- name: Install pkg-config
run: |
Expand Down
3 changes: 3 additions & 0 deletions numpy/distutils/tests/test_mingw32ccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
import subprocess
import sys
import pytest
import os

from numpy.distutils import mingw32ccompiler


@pytest.mark.skipif(sys.platform != 'win32', reason='win32 only test')
@pytest.mark.skipif(not os.path.exists(os.path.join(sys.prefix, 'libs')),
reason="test requires mingw library layout")
def test_build_import():
'''Test the mingw32ccompiler.build_import_library, which builds a
`python.a` from the MSVC `python.lib`
Expand Down
2 changes: 2 additions & 0 deletions requirements/setuptools_requirement.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
setuptools==65.5.1 ; python_version < '3.12'
setuptools ; python_version >= '3.12'
Loading