4
4
source gfortran-install/gfortran_utils.sh
5
5
6
6
function build_wheel {
7
+ # Work around bug in multibuild, until this is merged
8
+ # https://github.com/matthew-brett/multibuild/pull/315
9
+ if [ " ${PYTHON_VERSION: 0: 4} " == " pypy" -a " $PYTHON_EXE " != " $( readlink -f python) " ]; then
10
+ # possibly create a symbolic link if using pypy
11
+ ln -s $PYTHON_EXE $( dirname " $PYTHON_EXE " ) /python
12
+ fi
13
+ if [ " $( readlink -f $PYTHON_EXE ) " != " $( readlink -f python) " ]; then
14
+ echo expected python to be " $PYTHON_EXE " not " $( readlink -f python) "
15
+ exit 1
16
+ fi
7
17
local lib_plat=$PLAT
8
18
if [ -n " $IS_OSX " ]; then
9
19
install_gfortran
@@ -21,8 +31,8 @@ function build_libs {
21
31
# download and un-tar the openblas libraries. The python call returns
22
32
# the un-tar root directory, then the files are copied into /usr/local.
23
33
# Could utilize a site.cfg instead to prevent the copy.
24
- python -mpip install urllib3
25
- basedir=$( python numpy/tools/openblas_support.py)
34
+ $PYTHON_EXE -mpip install urllib3
35
+ basedir=$( $PYTHON_EXE numpy/tools/openblas_support.py)
26
36
$use_sudo cp -r $basedir /lib/* /usr/local/lib
27
37
$use_sudo cp $basedir /include/* /usr/local/include
28
38
}
@@ -39,10 +49,10 @@ function run_tests {
39
49
if [ -z " $IS_OSX " ]; then
40
50
apt-get -y update && apt-get install -y gfortran
41
51
fi
42
- python -c " $( get_test_cmd) "
52
+ $PYTHON_EXE -c " $( get_test_cmd) "
43
53
# Check bundled license file
44
- python ../check_license.py
54
+ $PYTHON_EXE ../check_license.py
45
55
# Show BLAS / LAPACK used. Since this uses a wheel we cannot use
46
56
# tools/openblas_config.py; tools is not part of what is shipped
47
- python -c ' import numpy; numpy.show_config()'
57
+ $PYTHON_EXE -c ' import numpy; numpy.show_config()'
48
58
}
0 commit comments