Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit e67eb92

Browse files
committed
use PYTHON_EXE not python, work around issue with multibuild not doing same
1 parent 6fd5151 commit e67eb92

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

config.sh

+11-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
source gfortran-install/gfortran_utils.sh
55

66
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+
# create a symbolic link if using pypy
11+
ln -s $PYTHON_EXE $(dirname "$PYTHON_EXE")/python
12+
fi
713
local lib_plat=$PLAT
814
if [ -n "$IS_OSX" ]; then
915
install_gfortran
@@ -21,8 +27,8 @@ function build_libs {
2127
# download and un-tar the openblas libraries. The python call returns
2228
# the un-tar root directory, then the files are copied into /usr/local.
2329
# Could utilize a site.cfg instead to prevent the copy.
24-
python -mpip install urllib3
25-
basedir=$(python numpy/tools/openblas_support.py)
30+
$PYTHON_EXE -mpip install urllib3
31+
basedir=$($PYTHON_EXE numpy/tools/openblas_support.py)
2632
$use_sudo cp -r $basedir/lib/* /usr/local/lib
2733
$use_sudo cp $basedir/include/* /usr/local/include
2834
}
@@ -39,10 +45,10 @@ function run_tests {
3945
if [ -z "$IS_OSX" ]; then
4046
apt-get -y update && apt-get install -y gfortran
4147
fi
42-
python -c "$(get_test_cmd)"
48+
$PYTHON_EXE -c "$(get_test_cmd)"
4349
# Check bundled license file
44-
python ../check_license.py
50+
$PYTHON_EXE ../check_license.py
4551
# Show BLAS / LAPACK used. Since this uses a wheel we cannot use
4652
# tools/openblas_config.py; tools is not part of what is shipped
47-
python -c 'import numpy; numpy.show_config()'
53+
$PYTHON_EXE -c 'import numpy; numpy.show_config()'
4854
}

0 commit comments

Comments
 (0)