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 1 commit
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
21 changes: 19 additions & 2 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,29 @@ function build_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 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