aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitrios Apostolou <jimis@qt.io>2020-02-04 18:30:04 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2020-02-18 08:35:20 +0000
commit3c29b705c3fcd9846120890f4b4bc7409744e999 (patch)
treefa413c790858cf35fbbdcbf79f4be0149a188a40
parent533daaa537f9d521d8bf0cdc3dbb8f0063f8448b (diff)
08-pythondev build should not execute external script
The important bits of the script were copied and modified. NOTE that we no longer build openssl from source, the distro (SLES15) provides a version that works well. Task-number: QTQAINFRA-3528 Change-Id: Iad63d75055a7efc3e104789e4a515b8511cf0880 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io> (cherry picked from commit db23c64876028d8c4584b58c049f0211764c775a) Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
-rwxr-xr-xcoin/provisioning/qtci-linux-SLES-15-x86_64/08-pythondev.sh42
1 files changed, 38 insertions, 4 deletions
diff --git a/coin/provisioning/qtci-linux-SLES-15-x86_64/08-pythondev.sh b/coin/provisioning/qtci-linux-SLES-15-x86_64/08-pythondev.sh
index cda48de7..ab35a009 100755
--- a/coin/provisioning/qtci-linux-SLES-15-x86_64/08-pythondev.sh
+++ b/coin/provisioning/qtci-linux-SLES-15-x86_64/08-pythondev.sh
@@ -41,11 +41,45 @@ set -ex
sudo zypper -nq install python-devel
-wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Python3/build_python3.sh
-bash build_python3.sh
+# Selected installation instructions coming from:
+# https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Python3/build_python3.sh
+export PACKAGE_NAME="python"
+export PACKAGE_VERSION="3.7.2"
+(
-export
-python3 --version
+ sudo zypper install -y gcc gcc-c++ make ncurses patch wget tar zlib-devel zlib libffi-devel libopenssl-devel
+
+ printf -- 'Configuration and Installation started \n'
+
+ #Downloading Source code
+ wget "https://www.python.org/ftp/${PACKAGE_NAME}/${PACKAGE_VERSION}/Python-${PACKAGE_VERSION}.tar.xz"
+ tar -xvf "Python-${PACKAGE_VERSION}.tar.xz"
+
+ #Configure and Build
+ cd "Python-${PACKAGE_VERSION}"
+ ./configure --prefix=/usr/local --exec-prefix=/usr/local
+ make
+ sudo make install
+
+ export PATH="/usr/local/bin:${PATH}"
+ printf -- '\nInstalled python successfully \n'
+
+ #Cleanup
+ cd -
+ rm "Python-${PACKAGE_VERSION}.tar.xz"
+
+ #Verify python installation
+ if command -V "$PACKAGE_NAME"${PACKAGE_VERSION:0:1} >/dev/null
+ then
+ printf -- "%s installation completed. Please check the Usage to start the service.\n" "$PACKAGE_NAME"
+ else
+ printf -- "Error while installing %s, exiting with 127 \n" "$PACKAGE_NAME"
+ exit 127
+ fi
+)
+
+
+python3 --version | fgrep "$PACKAGE_VERSION"
pip3 install --user wheel
pip3 install --user virtualenv