Skip to content
Snippets Groups Projects
Commit 378b3e7a authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Fix package name & install path logic for Python 3

parent 61e6d215
No related branches found
No related tags found
No related merge requests found
...@@ -169,10 +169,15 @@ fi ...@@ -169,10 +169,15 @@ fi
############################################################################### ###############################################################################
# Check if this is a Python 3 build and set CMake arguments. # Check if this is a Python 3 build and set CMake arguments.
############################################################################### ###############################################################################
PY2_BUILD=false
PY3_BUILD=false
if [[ ${JOB_NAME} == *python3* ]]; then if [[ ${JOB_NAME} == *python3* ]]; then
PY3_BUILD=true
PYTHON3_EXECUTABLE=`which python3` PYTHON3_EXECUTABLE=`which python3`
DIST_FLAGS="${DIST_FLAGS} -DPYTHON_EXECUTABLE=$PYTHON3_EXECUTABLE" DIST_FLAGS="${DIST_FLAGS} -DPYTHON_EXECUTABLE=$PYTHON3_EXECUTABLE"
PARAVIEW_DIR="${PARAVIEW_DIR}-python3" PARAVIEW_DIR="${PARAVIEW_DIR}-python3"
else
PY2_BUILD=true
fi fi
############################################################################### ###############################################################################
...@@ -191,14 +196,15 @@ if [[ "$BUILDPKG" == true ]]; then ...@@ -191,14 +196,15 @@ if [[ "$BUILDPKG" == true ]]; then
PACKAGE_SUFFIX="unstable" PACKAGE_SUFFIX="unstable"
fi fi
if [[ ${JOB_NAME} == *release* ]]; then if [[ ${PY3_BUILD} == true ]]; then
# No suffix and traditional install path # Add '-python3' to package name and install path
PACKAGE_SUFFIX=${PACKAGE_SUFFIX}-python3
fi
if [[ ${JOB_NAME} == *release* ]] && [[ ${PY2_BUILD} == true ]]; then
# No suffix and traditional install path for python 2 release build
PACKAGINGVARS="${PACKAGINGVARS} -DCMAKE_INSTALL_PREFIX=/opt/Mantid -DCPACK_PACKAGE_SUFFIX=" PACKAGINGVARS="${PACKAGINGVARS} -DCMAKE_INSTALL_PREFIX=/opt/Mantid -DCPACK_PACKAGE_SUFFIX="
else else
if [[ ${JOB_NAME} == *python3* ]]; then # everything else uses lower-case values
# Add '-python3' to package name and install path
PACKAGE_SUFFIX=${PACKAGE_SUFFIX}-python3
fi
PACKAGINGVARS="${PACKAGINGVARS} -DCMAKE_INSTALL_PREFIX=/opt/mantid${PACKAGE_SUFFIX} -DCPACK_PACKAGE_SUFFIX=${PACKAGE_SUFFIX}" PACKAGINGVARS="${PACKAGINGVARS} -DCMAKE_INSTALL_PREFIX=/opt/mantid${PACKAGE_SUFFIX} -DCPACK_PACKAGE_SUFFIX=${PACKAGE_SUFFIX}"
fi fi
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment