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

Commit d460799

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

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

config.sh

+15-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
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+
# 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
717
local lib_plat=$PLAT
818
if [ -n "$IS_OSX" ]; then
919
install_gfortran
@@ -21,8 +31,8 @@ function build_libs {
2131
# download and un-tar the openblas libraries. The python call returns
2232
# the un-tar root directory, then the files are copied into /usr/local.
2333
# 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)
2636
$use_sudo cp -r $basedir/lib/* /usr/local/lib
2737
$use_sudo cp $basedir/include/* /usr/local/include
2838
}
@@ -39,10 +49,10 @@ function run_tests {
3949
if [ -z "$IS_OSX" ]; then
4050
apt-get -y update && apt-get install -y gfortran
4151
fi
42-
python -c "$(get_test_cmd)"
52+
$PYTHON_EXE -c "$(get_test_cmd)"
4353
# Check bundled license file
44-
python ../check_license.py
54+
$PYTHON_EXE ../check_license.py
4555
# Show BLAS / LAPACK used. Since this uses a wheel we cannot use
4656
# 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()'
4858
}

0 commit comments

Comments
 (0)