@@ -44,16 +44,29 @@ jobs:
4444 - { minimal: true, python: cp310 }
4545 - { minimal: true, python: cp311 }
4646 - { minimal: true, python: cp312 }
47+ - { minimal: true, python: cp313 }
4748 - { minimal: true, platform: { arch: universal2 } }
4849 runs-on : ${{ matrix.platform.os }}
4950 env :
51+ # ## cibuildwheel configuration
52+ #
53+ # This is somewhat brittle, so be careful with changes. Some notes for our future selves (and others):
54+ # - cibw will change its cwd to a temp dir and create a separate venv for testing. It then installs the wheel it
55+ # built into that venv, and run the CIBW_TEST_COMMAND. We have to install all dependencies ourselves, and make
56+ # sure that the pytest config in pyproject.toml is available.
57+ # - CIBW_BEFORE_TEST installs the test dependencies by exporting them into a pylock.toml. At the time of writing,
58+ # `uv sync --no-install-project` had problems correctly resolving dependencies using resolution environments
59+ # across all platforms we build for. This might be solved in newer uv versions.
60+ # - CIBW_TEST_COMMAND specifies pytest conf from pyproject.toml. --confcutdir is needed to prevent pytest from
61+ # traversing the full filesystem, which produces an error on Windows.
62+ # - CIBW_TEST_SKIP we always skip tests for *-macosx_universal2 builds, because we run tests for arm64 and x86_64.
5063 CIBW_TEST_SKIP : ${{ inputs.testsuite == 'none' && '*' || '*-macosx_universal2' }}
5164 CIBW_TEST_SOURCES : tests
5265 CIBW_BEFORE_TEST : >
53- uv export --only-group test --no-emit-project --output-file pylock.toml --directory {project} &&
66+ uv export --only-group test --no-emit-project --quiet --output-file pylock.toml --directory {project} &&
5467 uv pip install -r pylock.toml
5568 CIBW_TEST_COMMAND : >
56- uv run -v pytest ${{ inputs.testsuite == 'fast' && './tests/fast' || './tests' }} --verbose --ignore=./tests/stubs
69+ uv run -v pytest --confcutdir=. --rootdir . -c {project}/pyproject.toml ${{ inputs.testsuite == 'fast' && './tests/fast' || './tests' }}
5770
5871 steps :
5972 - name : Checkout DuckDB Python
@@ -78,15 +91,14 @@ jobs:
7891 run : echo "CIBW_ENVIRONMENT=OVERRIDE_GIT_DESCRIBE=${{ inputs.set-version }}" >> $GITHUB_ENV
7992
8093 # Install Astral UV, which will be used as build-frontend for cibuildwheel
81- - uses : astral-sh/setup-uv@v6
94+ - uses : astral-sh/setup-uv@v7
8295 with :
83- version : " 0.8.16 "
96+ version : " 0.9.0 "
8497 enable-cache : false
8598 cache-suffix : -${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}
86- python-version : ${{ matrix.python }}
8799
88100 - name : Build${{ inputs.testsuite != 'none' && ' and test ' || ' ' }}wheels
89- uses : pypa/cibuildwheel@v3.1
101+ uses : pypa/cibuildwheel@v3.2
90102 env :
91103 CIBW_ARCHS : ${{ matrix.platform.arch == 'amd64' && 'AMD64' || matrix.platform.arch }}
92104 CIBW_BUILD : ${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}
0 commit comments