Use MPI_PYTHON3_SITEARCH

This commit is contained in:
Sandro Mani 2016-05-12 13:16:10 +02:00
parent f22d4de92f
commit ed9755f4a4
2 changed files with 4 additions and 12 deletions

View File

@ -51,7 +51,8 @@ if [ -e /etc/profile.d/modules.sh ]; then
module load $module
mpi_compiler_for_dir[${MPI_HOME}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_FORTRAN_MOD_DIR}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_PYTHON_SITEARCH}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_PYTHON2_SITEARCH}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_PYTHON3_SITEARCH}]=${MPI_COMPILER}
module unload $module
done
fi

13
mpi.req
View File

@ -28,9 +28,6 @@ if [ ! -d "$buildroot" ]; then
exit 1
fi
# Try to determine python3 version in the same way that %{python3_version} does
PYTHON3_VERSION="$(/usr/bin/python3 -c 'import sys; sys.stdout.write(sys.version[:3])')"
# Remaining arguments are passed to elfdeps
shift
elfdepsargs="$@"
@ -56,16 +53,10 @@ if [ -e /etc/profile.d/modules.sh ]; then
module load $module
mpi_compiler_for_dir[${MPI_HOME}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_FORTRAN_MOD_DIR}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_PYTHON_SITEARCH}]=${MPI_COMPILER}
if [ -n "${MPI_PYTHON_SITEARCH}" -a -n "${PYTHON3_VERSION}" ]; then
if [ -z "${MPI_PYTHON3_SITEARCH}" ]; then
MPI_PYTHON3_SITEARCH="${MPI_PYTHON_SITEARCH/2.7/${PYTHON3_VERSION}}"
fi
mpi_compiler_for_dir[${MPI_PYTHON3_SITEARCH}]=${MPI_COMPILER}
fi
mpi_compiler_for_dir[${MPI_PYTHON2_SITEARCH}]=${MPI_COMPILER}
mpi_compiler_for_dir[${MPI_PYTHON3_SITEARCH}]=${MPI_COMPILER}
mpi_lib_for_compiler[${MPI_COMPILER}]=${MPI_LIB}
module unload $module
unset MPI_PYTHON3_SITEARCH
done
fi