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

Commit 8b27329

Browse files
isurufjudahrandrgommers
authored
Fixes for latest commit of scipy and add universal2 wheels (#125)
* Enable universal2 wheels Changes ported from `numpy-wheels` found at: - MacPython/numpy-wheels#104 - MacPython/numpy-wheels#115 * Add missing call to `wrap_wheel_builder` * Add `install_delocate` Ported from: - MacPython/numpy-wheels#109 - MacPython/numpy-wheels#110 * Trigger rebuild now that the needed SciPy PR is merged * use mingw-w64 gcc=7 * update multibuild * cleanup config.sh * Set F77 and F90 too * Set MB_ML_VER * run build_libs for osx * gcc 7 for i686 * set _ISOC99_SOURCE * cleanup * Need fPIC for Linux * fPIC for all platforms * keep using MB_ML_VER=1 until we drop manylinux1 Co-authored-by: Judah Rand <[email protected]> Co-authored-by: Ralf Gommers <[email protected]>
1 parent d3609de commit 8b27329

7 files changed

+36
-34
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
- PLAT=aarch64
4545
- CYTHON_BUILD_DEP="Cython"
4646
- DOCKER_IMAGE=quay.io/pypa/manylinux2014_${PLAT}
47+
- MB_ML_VER=2014
4748
script:
4849
- echo "This stage will just build AArch64 wheel"
4950
workspaces:
@@ -64,6 +65,7 @@ jobs:
6465
- PLAT=aarch64
6566
- CYTHON_BUILD_DEP="Cython"
6667
- DOCKER_IMAGE=quay.io/pypa/manylinux2014_${PLAT}
68+
- MB_ML_VER=2014
6769
script:
6870
- echo "This stage will just build AArch64 wheel"
6971
workspaces:
@@ -84,6 +86,7 @@ jobs:
8486
- PLAT=aarch64
8587
- CYTHON_BUILD_DEP="Cython"
8688
- DOCKER_IMAGE=quay.io/pypa/manylinux2014_${PLAT}
89+
- MB_ML_VER=2014
8790
script:
8891
- echo "This stage will just build AArch64 wheel"
8992
workspaces:
@@ -105,6 +108,7 @@ jobs:
105108
- PLAT=aarch64
106109
- CYTHON_BUILD_DEP="Cython"
107110
- DOCKER_TEST_IMAGE=multibuild/xenial_arm64v8
111+
- MB_ML_VER=2014
108112
workspaces:
109113
use: ws1
110114
install:
@@ -119,6 +123,7 @@ jobs:
119123
- PLAT=aarch64
120124
- CYTHON_BUILD_DEP="Cython"
121125
- DOCKER_TEST_IMAGE=multibuild/xenial_arm64v8
126+
- MB_ML_VER=2014
122127
workspaces:
123128
use: ws4
124129
install:
@@ -133,6 +138,7 @@ jobs:
133138
- PLAT=aarch64
134139
- CYTHON_BUILD_DEP="Cython"
135140
- DOCKER_TEST_IMAGE=multibuild/xenial_arm64v8
141+
- MB_ML_VER=2014
136142
workspaces:
137143
use: ws3
138144
install:

appveyor.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ cache:
1010

1111
environment:
1212
global:
13-
MINGW_32: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
14-
MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
13+
MINGW_32: C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin
14+
MINGW_64: C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin
1515
CYTHON_BUILD_DEP: Cython==0.29.18
1616
PYTHRAN_BUILD_DEP: pythran
1717
NUMPY_TEST_DEP: numpy==1.16.5
@@ -89,6 +89,9 @@ install:
8989
- echo "Installed SDKs:"
9090
- dir "C:/Program Files/Microsoft SDKs/Windows"
9191

92+
# install a newer mingw for i686 as the appveyor images don't have gcc 7+ for i686
93+
- if [%PYTHON_ARCH%]==[32] choco install -y mingw --forcex86 --force --version=7.3.0
94+
9295
- git submodule update --init
9396

9497
# Install new Python if necessary

azure-pipelines.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,21 @@ jobs:
3838
- template: azure-posix.yml
3939
parameters:
4040
name: macOS
41-
vmImage: macOS-10.14
41+
vmImage: macOS-10.15
4242
matrix:
4343
osx-Py37:
4444
MB_PYTHON_VERSION: "3.7"
4545
osx-Py38:
4646
MB_PYTHON_VERSION: "3.8"
4747
MB_PYTHON_OSX_VER: "10.9"
48+
osx-Py38-universal2:
49+
MB_PYTHON_VERSION: "3.8"
50+
MB_PYTHON_OSX_VER: "10.9"
51+
PLAT: universal2
4852
osx-Py39:
4953
MB_PYTHON_VERSION: "3.9"
5054
MB_PYTHON_OSX_VER: "10.9"
55+
osx-Py39-universal2:
56+
MB_PYTHON_VERSION: "3.9"
57+
MB_PYTHON_OSX_VER: "10.9"
58+
PLAT: universal2

azure-posix.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
PLAT: "x86_64"
1313
NIGHTLY_BUILD_COMMIT: "master"
1414
DAILY_COMMIT: "master"
15+
MB_ML_VER: "1"
1516
strategy:
1617
matrix:
1718
${{ insert }}: ${{ parameters.matrix }}
@@ -56,8 +57,9 @@ jobs:
5657
displayName: Define build env variables
5758
5859
- bash: |
59-
set -e
60+
set -ex
6061
echo building for commit "$BUILD_COMMIT"
62+
6163
pip install --upgrade virtualenv wheel setuptools
6264
BUILD_DEPENDS="wheel oldest-supported-numpy Cython>=0.29.18 pybind11>=2.4.3 pythran"
6365

config.sh

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,24 @@
44
source gfortran-install/gfortran_utils.sh
55

66
function build_wheel {
7+
export FFLAGS="$FFLAGS -fPIC"
78
if [ -z "$IS_OSX" ]; then
8-
unset FFLAGS
9-
export LDFLAGS="-shared -Wl,-strip-all"
109
build_libs $PLAT
1110
# Work round build dependencies spec in pyproject.toml
1211
build_bdist_wheel $@
1312
else
14-
export FFLAGS="$FFLAGS -fPIC"
15-
build_osx_wheel $@
13+
install_gfortran
14+
wrap_wheel_builder build_osx_wheel $@
1615
fi
1716
}
1817

1918
function build_libs {
2019
PYTHON_EXE=`which python`
2120
$PYTHON_EXE -c"import platform; print('platform.uname().machine', platform.uname().machine)"
2221
basedir=$($PYTHON_EXE scipy/tools/openblas_support.py)
23-
$use_sudo cp -r $basedir/lib/* /usr/local/lib
24-
$use_sudo cp $basedir/include/* /usr/local/include
25-
}
26-
27-
function set_arch {
28-
local arch=$1
29-
export CC="clang $arch"
30-
export CXX="clang++ $arch"
31-
export CFLAGS="$arch"
32-
export FFLAGS="$arch"
33-
export FARCH="$arch"
34-
export LDFLAGS="$arch"
22+
$use_sudo cp -r $basedir/lib/* $BUILD_PREFIX/lib
23+
$use_sudo cp $basedir/include/* $BUILD_PREFIX/include
24+
export OPENBLAS=$BUILD_PREFIX
3525
}
3626

3727
function build_wheel_with_patch {
@@ -41,19 +31,12 @@ function build_wheel_with_patch {
4131
}
4232

4333
function build_osx_wheel {
44-
# Build 64-bit wheel
45-
# Standard gfortran won't build dual arch objects.
4634
local repo_dir=${1:-$REPO_DIR}
47-
local py_ld_flags="-Wall -undefined dynamic_lookup -bundle"
48-
49-
install_gfortran
50-
# 64-bit wheel
51-
local arch="-m64"
52-
set_arch $arch
53-
build_libs x86_64
54-
# Build wheel
55-
export LDSHARED="$CC $py_ld_flags"
56-
export LDFLAGS="$arch $py_ld_flags"
35+
if [ ! -z "$FC" ]; then
36+
export F77=$FC
37+
export F90=$FC
38+
fi
39+
build_libs
5740
# Work round build dependencies spec in pyproject.toml
5841
# See e.g.
5942
# https://travis-ci.org/matthew-brett/scipy-wheels/jobs/387794282

0 commit comments

Comments
 (0)