Skip to content

Commit 28f4c2d

Browse files
committed
Try fix for Python 3.9
1 parent e9270db commit 28f4c2d

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,6 @@ matrix:
106106
- MB_PYTHON_VERSION=3.9
107107
- NP_BUILD_DEP="numpy==1.20"
108108
- NP_TEST_DEP="numpy==1.20"
109-
# Numpy 1.20 rejects Accelerate as installation
110-
# option; disable this search.
111-
- NPY_BLAS_ORDER=""
112-
- NPY_LAPACK_ORDER=""
113109

114110
before_install:
115111
- BUILD_DEPENDS="$NP_BUILD_DEP Cython nibabel sympy $SP_DEP"

config.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
# Define custom utilities
2-
# Test for OSX with [ -n "$IS_OSX" ]
2+
# Test for OSX with [ -n "$IS_MACOS" ]
33

44
function pre_build {
5-
# Any stuff that you need to do before you start building the wheels
5+
# Any stuff that you need to do before you start
6+
# building the wheels.
67
# Runs in the root directory of this repository.
7-
:
8+
# Accelerate error only on macOS
9+
if [ -z "$IS_MACOS" ]; then return; fi
10+
# Only for Numpy >= 1.20
11+
local np_ver=$(python -c 'import numpy; print(numpy.__version__)')
12+
if [ $(lex_ver $np_ver) -lt $(lex_ver 1.20) ]; then
13+
return
14+
fi
15+
# Just in case.
16+
brew install openblas
17+
cp site.cfg.openblas nipy/site.cfg
818
}
919

1020
function run_tests {

site.cfg.openblas

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[openblas]
2+
libraries = openblas
3+
library_dirs = /usr/local/lib
4+
include_dirs = /usr/local/include
5+
runtime_library_dirs = /usr/local/lib

0 commit comments

Comments
 (0)