Skip to content

Commit

Permalink
BLD: make cp313 wheels [wheel build]
Browse files Browse the repository at this point in the history
  • Loading branch information
andyfaff committed Jun 20, 2024
1 parent 1d59ab9 commit 6acd83c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,14 @@ jobs:
- [macos-14, macosx, arm64, openblas, "12.0"]
- [macos-14, macosx, arm64, accelerate, "14.0"]
- [windows-2019, win, AMD64, "", ""]

python: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]]
python: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"]]
# python[0] is used to specify the python versions made by cibuildwheel
exclude:
# currently delocate doesn't like cp313 macos_arm64-openblas wheel
# as the build targets macos-12, but bundled libs used in
# openblas have a minimum macos version of 12.3 (apparently).
- buildplat: [macos-14, macosx, arm64, openblas, "12.0"]
python: ["cp313", "3.13"]

env:
IS_32_BIT: ${{ matrix.buildplat[2] == 'x86' }}
Expand Down Expand Up @@ -116,13 +121,13 @@ jobs:
if: ${{ runner.os == 'Windows' && env.IS_32_BIT == 'false' }}

- name: windows - set PKG_CONFIG_PATH
if: ${{ runner.os == 'Windows' }}
run: |
$env:CIBW = "${{ github.workspace }}"
# It seems somewhere in the env passing, `\` is not
# passed through, so convert it to '/'
$env:CIBW=$env:CIBW.replace("\","/")
echo "CIBW_ENVIRONMENT_WINDOWS=PKG_CONFIG_PATH=$env:CIBW" >> $env:GITHUB_ENV
if: ${{ runner.os == 'Windows' }}
echo "CIBW_ENVIRONMENT=PKG_CONFIG_PATH=$env:CIBW" >> $env:GITHUB_ENV
- name: Setup macOS
if: startsWith( matrix.buildplat[0], 'macos-' )
Expand All @@ -149,7 +154,7 @@ jobs:
CIBW="MACOSX_DEPLOYMENT_TARGET=${{ matrix.buildplat[4] }}\
SDKROOT=$(xcrun --sdk macosx --show-sdk-path)\
PKG_CONFIG_PATH=${{ github.workspace }}"
echo "CIBW_ENVIRONMENT_MACOS=$CIBW" >> "$GITHUB_ENV"
echo "CIBW_ENVIRONMENT=$CIBW" >> "$GITHUB_ENV"
echo "REPAIR_PATH=$LIB_PATH" >> "$GITHUB_ENV"
Expand All @@ -172,8 +177,32 @@ jobs:
fi
echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=$CIBW" >> "$GITHUB_ENV"
- name: Inject environment variable for python dev version
if: matrix.python[1] == '3.13'
shell: bash
run: |
# For dev versions of python need to use wheels from scientific-python-nightly-wheels
# When the python version is released please comment out this section, but do not remove
# (there will soon be another dev version to target).
DEPS0="pip install --pre -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy"
DEPS1="pip install ninja meson-python pybind11 pythran cython"
CIBW="$DEPS0;$DEPS1;bash {project}/tools/wheels/cibw_before_build_linux.sh {project}"
echo "CIBW_BEFORE_BUILD_LINUX=$CIBW" >> "$GITHUB_ENV"
CIBW="$DEPS0 && $DEPS1 && bash {project}/tools/wheels/cibw_before_build_win.sh {project}"
echo "CIBW_BEFORE_BUILD_WINDOWS=$CIBW" >> "$GITHUB_ENV"
CIBW="$DEPS0;$DEPS1;bash {project}/tools/wheels/cibw_before_build_macos.sh {project}"
echo "CIBW_BEFORE_BUILD_MACOS=$CIBW" >> "$GITHUB_ENV"
echo "CIBW_BEFORE_TEST=$DEPS0" >> "$GITHUB_ENV"
CIBW="pip; args: --no-build-isolation"
echo "CIBW_BUILD_FRONTEND=$CIBW" >> "$GITHUB_ENV"
- name: Build wheels
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}*
CIBW_ARCHS: ${{ matrix.buildplat[2] }}
Expand Down
2 changes: 1 addition & 1 deletion ci/cirrus_wheels.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel==2.17.0
- python -m pip install cibuildwheel==2.19.1
cibuildwheel_script:
- cibuildwheel
wheels_artifacts:
Expand Down
2 changes: 1 addition & 1 deletion tools/wheels/cibw_before_build_win.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ python -m pip install -r requirements/openblas.txt
python -c "import scipy_openblas32; print(scipy_openblas32.get_pkg_config())" > $PROJECT_DIR/scipy-openblas.pc

# delvewheel is the equivalent of delocate/auditwheel for windows.
python -m pip install delvewheel
python -m pip install delvewheel wheel

0 comments on commit 6acd83c

Please sign in to comment.