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

Commit a52fc18

Browse files
committed
Try using local version of numpy distutils
From suggestion by PV
1 parent 4d7ac63 commit a52fc18

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Diff for: config.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ function set_arch {
3535
export LDFLAGS="$arch"
3636
}
3737

38+
function build_wheel_with_patch {
39+
# Patch numpy distutils to fix OpenBLAS build
40+
(cd .. && ./patch_numpy.sh)
41+
bdist_wheel_cmd $@
42+
}
43+
3844
function build_osx_wheel {
3945
# Build 64-bit wheel
4046
# Standard gfortran won't build dual arch objects.
@@ -52,7 +58,7 @@ function build_osx_wheel {
5258
# Work round build dependencies spec in pyproject.toml
5359
# See e.g.
5460
# https://travis-ci.org/matthew-brett/scipy-wheels/jobs/387794282
55-
build_bdist_wheel "$repo_dir"
61+
build_wheel_cmd "build_wheel_with_patch" "$repo_dir"
5662
}
5763

5864
function run_tests {

Diff for: patch_numpy.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# Patch numpy distutils and compat with the version in this repo.
3+
# Needed for correct detection of openblas on Mac.
4+
np_root=$(dirname $(python -c "import numpy as np; print(np.__file__)"))
5+
for sdir in distutils compat; do
6+
rsync --delete -r numpy-distutils/numpy/${sdir}/ ${np_root}/${sdir}
7+
done

0 commit comments

Comments
 (0)