adapting jenkinsfile

master
rforstner 2022-01-26 17:29:38 +01:00
parent b291b2a308
commit 3346ea1337
1 changed files with 28 additions and 0 deletions

28
installpyenv.sh Normal file
View File

@ -0,0 +1,28 @@
# !/bin/bash
# Step 1. Install pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
source ~/.bashrc
# Step 2. Install missing headers for all the Python modules to be built and make sure gcc is installed
sudo zypper install readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc
# Step 3. Install the desired Python version
pyenv install 3.7.4
# Step 4. Install virtualenv
sudo zypper install python3-virtualenv
# Step 5. Create a virtual environment for the installed Python and activate it
mkdir ~/pythons
cd ~/pythons
virtualenv -p ~/.pyenv/versions/3.7.4/bin/python3.7 python3.7.4
source ./python3.7.4/bin/activate