Skip to content

Commit ed181eb

Browse files
committed
Oops - we don't have Numpy yet.
1 parent 5ed5a66 commit ed181eb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

config.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ function pre_build {
55
# Any stuff that you need to do before you start
66
# building the wheels.
77
# Runs in the root directory of this repository.
8-
# Accelerate error only on macOS
8+
# Workaround for Accelerate error; only on macOS.
99
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
10+
# We need NP_BUILD_DEP to know which Numpy we will
11+
# get - so this variable must be defined here.
12+
# It will be for macOS builds that see the env vars
13+
# from the travis config.
14+
if [ -z "$NP_BUILD_DEP" ]; then return; fi
15+
# Problem only arises for Numpy >= 1.20
16+
if [ $(lex_ver $NP_BUILD_DEP) -lt $(lex_ver 1.20) ]; then
1317
return
1418
fi
1519
# Just in case.

0 commit comments

Comments
 (0)