Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Enable universal2 wheels #123

Closed
wants to merge 4 commits into from
Closed
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
10 changes: 9 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,21 @@ jobs:
- template: azure-posix.yml
parameters:
name: macOS
vmImage: macOS-10.14
vmImage: macOS-10.15
matrix:
osx-Py37:
MB_PYTHON_VERSION: "3.7"
osx-Py38:
MB_PYTHON_VERSION: "3.8"
MB_PYTHON_OSX_VER: "10.9"
osx-Py38-universal2:
MB_PYTHON_VERSION: "3.8"
MB_PYTHON_OSX_VER: "10.9"
PLAT: universal2
osx-Py39:
MB_PYTHON_VERSION: "3.9"
MB_PYTHON_OSX_VER: "10.9"
osx-Py39-universal2:
MB_PYTHON_VERSION: "3.9"
MB_PYTHON_OSX_VER: "10.9"
PLAT: universal2
3 changes: 2 additions & 1 deletion azure-posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ jobs:
displayName: Define build env variables

- bash: |
set -e
set -ex
echo building for commit "$BUILD_COMMIT"

pip install --upgrade virtualenv wheel setuptools
BUILD_DEPENDS="wheel oldest-supported-numpy Cython>=0.29.18 pybind11>=2.4.3 pythran"

Expand Down
28 changes: 25 additions & 3 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,38 @@ function build_wheel {
build_bdist_wheel $@
else
export FFLAGS="$FFLAGS -fPIC"
build_osx_wheel $@
wrap_wheel_builder build_osx_wheel $@
fi
judahrand marked this conversation as resolved.
Show resolved Hide resolved
}

# TODO: Remove once https://github.com/matthew-brett/multibuild/pull/409 lands
function pyinst_fname_for_version {
# echo filename for OSX installer file given Python and minimum
# macOS versions
# Parameters
# $py_version (Python version in major.minor.extra format)
# $py_osx_ver: {major.minor | not defined}
# if defined, the minimum macOS SDK version that Python is
# built for, eg: "10.6" or "10.9", if not defined, infers
# this from $py_version using macpython_sdk_for_version
local py_version=$1
local py_osx_ver=${2:-$(macpython_sdk_for_version $py_version)}
local inst_ext=$(pyinst_ext_for_version $py_version)
echo "python-${py_version}-macosx${py_osx_ver}.${inst_ext}"
}

function install_delocate {
check_pip
$PIP_CMD install git+https://github.com/isuruf/delocate.git@arm64
}

Comment on lines +19 to +39
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you update multibuild, this can be removed.

function build_libs {
PYTHON_EXE=`which python`
$PYTHON_EXE -c"import platform; print('platform.uname().machine', platform.uname().machine)"
basedir=$($PYTHON_EXE scipy/tools/openblas_support.py)
$use_sudo cp -r $basedir/lib/* /usr/local/lib
$use_sudo cp $basedir/include/* /usr/local/include
$use_sudo cp -r $basedir/lib/* $BUILD_PREFIX/lib
$use_sudo cp $basedir/include/* $BUILD_PREFIX/include
export OPENBLAS=$BUILD_PREFIX
}

function set_arch {
Expand Down
2 changes: 1 addition & 1 deletion gfortran-install