Skip to content

Commit

Permalink
CI: [wheel build]
Browse files Browse the repository at this point in the history
  • Loading branch information
andyfaff committed Mar 7, 2024
1 parent 5c81dcf commit 2a46091
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 52 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,12 @@ jobs:
if [[ ${{ matrix.buildplat[2] }} == 'arm64' ]]; then
# macosx_arm64
# gfortran is installed into /usr/local by the cibw_before_build_macos script
sudo xcode-select -s /Applications/Xcode_15.2.app
# for some reason gfortran is not on the path
GFORTRAN_LOC=$(brew --prefix gfortran)/bin/gfortran
ln -s $GFORTRAN_LOC gfortran
echo "PATH=$PWD:$PATH" >> "$GITHUB_ENV"
CIBW="MACOSX_DEPLOYMENT_TARGET=12.0\
MACOS_DEPLOYMENT_TARGET=12.0\
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH\
Expand Down
46 changes: 0 additions & 46 deletions ci/cirrus_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,51 +46,6 @@ cirrus_wheels_linux_aarch64_task:
<<: *BUILD_AND_STORE_WHEELS


######################################################################
# Build macosx_arm64 natively
######################################################################

cirrus_wheels_macos_arm64_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:14
matrix:
- env:
# building all four wheels in a single task takes ~45 mins
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
env:
PATH: /opt/homebrew/opt/[email protected]/bin:$PATH
CIBW_PRERELEASE_PYTHONS: True
CIBW_ENVIRONMENT: >
MACOSX_DEPLOYMENT_TARGET=12.0
_PYTHON_HOST_PLATFORM="macosx-12.0-arm64"
PIP_PRE=1
PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
PIP_NO_BUILD_ISOLATION=false
# TODO remove the following line once there are numpy2.0 wheels available on PyPI.
# Also remove PIP_NO_BUILD_ISOLATION, PIP_EXTRA_INDEX_URL flags.
CIBW_BEFORE_BUILD_MACOS: "pip install numpy>=2.0.0.dev0 meson-python cython pythran pybind11 ninja;bash {project}/tools/wheels/cibw_before_build_macos.sh {project}"
PKG_CONFIG_PATH: /opt/arm64-builds/lib/pkgconfig
# assumes that the cmake config is in /usr/local/lib/cmake
CMAKE_PREFIX_PATH: /opt/arm64-builds/
REPAIR_PATH: /usr/local/gfortran/lib:/opt/arm64-builds/lib
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
DYLD_LIBRARY_PATH=/usr/local/gfortran/lib:/opt/arm64-builds/lib delocate-listdeps {wheel} &&
DYLD_LIBRARY_PATH=/usr/local/gfortran/lib:/opt/arm64-builds/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
install_pre_requirements_script:
- brew install [email protected]
- ln -s python3 /opt/homebrew/opt/[email protected]/bin/python

build_script:
- which python
# needed for submodules
- git submodule update --init
- uname -m
- python -c "import platform;print(platform.python_version());print(platform.system());print(platform.machine())"
- clang --version
<<: *BUILD_AND_STORE_WHEELS


######################################################################
# Upload all wheels
######################################################################
Expand All @@ -102,7 +57,6 @@ cirrus_wheels_upload_task:
# which bash, etc, may not be present.
depends_on:
- cirrus_wheels_linux_aarch64
- cirrus_wheels_macos_arm64
compute_engine_instance:
image_project: cirrus-images
image: family/docker-builder
Expand Down
8 changes: 4 additions & 4 deletions doc/source/dev/toolchain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,17 @@ Official Builds
Currently, SciPy wheels are being built as follows:

================ ============================== ============================== =============================
Platform CI Base Images [5]_ [6]_ [7]_ Compilers Comment
Platform CI Base Images [5]_ [6]_ Compilers Comment
================ ============================== ============================== =============================
Linux x86 ``ubuntu-22.04`` GCC 10.2.1 ``cibuildwheel``
Linux arm ``docker-builder-arm64`` GCC 11.3.0 ``cibuildwheel``
OSX x86 ``macOS-11`` clang-13/gfortran 11.3.0 ``cibuildwheel``
OSX arm ``macos-monterey-xcode:14`` clang-13.1.6/gfortran 12.1.0 ``cibuildwheel``
OSX x86_64 ``macOS-11`` clang-13/gfortran 11.3.0 ``cibuildwheel``
OSX arm64 ``macos-14`` clang-15.0.0/gfortran 13.2.0 ``cibuildwheel``
Windows ``windows-2019`` GCC 10.3 (rtools) ``cibuildwheel``
================ ============================== ============================== =============================

Note that the OSX wheels additionally vendor gfortran 11.3.0 for x86_64,
and gfortran 12.1.0 for arm64. See ``tools/wheels/cibw_before_build_macos.sh``.
and gfortran 13.2.0 for arm64. See ``tools/wheels/cibw_before_build_macos.sh``.


C Compilers
Expand Down

0 comments on commit 2a46091

Please sign in to comment.