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

Commit

Permalink
use PYTHON_EXE not python, work around issue with multibuild not doin…
Browse files Browse the repository at this point in the history
…g same
  • Loading branch information
mattip committed Mar 8, 2020
1 parent 6fd5151 commit d460799
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
source gfortran-install/gfortran_utils.sh

function build_wheel {
# Work around bug in multibuild, until this is merged
# https://github.com/matthew-brett/multibuild/pull/315
if [ "${PYTHON_VERSION:0:4}" == "pypy" -a "$PYTHON_EXE" != "$(readlink -f python)" ]; then
# possibly create a symbolic link if using pypy
ln -s $PYTHON_EXE $(dirname "$PYTHON_EXE")/python
fi
if [ "$(readlink -f $PYTHON_EXE)" != "$(readlink -f python)" ]; then
echo expected python to be "$PYTHON_EXE" not "$(readlink -f python)"
exit 1
fi
local lib_plat=$PLAT
if [ -n "$IS_OSX" ]; then
install_gfortran
Expand All @@ -21,8 +31,8 @@ function build_libs {
# download and un-tar the openblas libraries. The python call returns
# the un-tar root directory, then the files are copied into /usr/local.
# Could utilize a site.cfg instead to prevent the copy.
python -mpip install urllib3
basedir=$(python numpy/tools/openblas_support.py)
$PYTHON_EXE -mpip install urllib3
basedir=$($PYTHON_EXE numpy/tools/openblas_support.py)
$use_sudo cp -r $basedir/lib/* /usr/local/lib
$use_sudo cp $basedir/include/* /usr/local/include
}
Expand All @@ -39,10 +49,10 @@ function run_tests {
if [ -z "$IS_OSX" ]; then
apt-get -y update && apt-get install -y gfortran
fi
python -c "$(get_test_cmd)"
$PYTHON_EXE -c "$(get_test_cmd)"
# Check bundled license file
python ../check_license.py
$PYTHON_EXE ../check_license.py
# Show BLAS / LAPACK used. Since this uses a wheel we cannot use
# tools/openblas_config.py; tools is not part of what is shipped
python -c 'import numpy; numpy.show_config()'
$PYTHON_EXE -c 'import numpy; numpy.show_config()'
}

0 comments on commit d460799

Please sign in to comment.