File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,15 @@ function pre_build {
5
5
# Any stuff that you need to do before you start
6
6
# building the wheels.
7
7
# Runs in the root directory of this repository.
8
- # Accelerate error only on macOS
8
+ # Workaround for Accelerate error; only on macOS.
9
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
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
13
17
return
14
18
fi
15
19
# Just in case.
You can’t perform that action at this time.
0 commit comments