Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit 3fb3b3c

Browse files
author
James Williams
authored
Correct python & pyenv instructions for deployment (#268)
## What is the goal of this PR? We've corrected the python and pyenv instructions for deployment. ## What are the changes implemented in this PR? For deploy-github and deploy-pip-release, we've implemented known working pyenv instructions. For test-deployment-pip, we've ensured we use Python 3.
1 parent 11e1f3b commit 3fb3b3c

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.factory/automation.yml

+13-7
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ build:
226226
bazel run //tests:typedb-extractor -- typedb-all-linux
227227
./typedb-all-linux/typedb server &
228228
python3 -m pip install --extra-index-url https://repo.vaticle.com/repository/pypi-snapshot/simple typedb-client==0.0.0-$FACTORY_COMMIT
229-
cd tests/deployment/ && python -m unittest test && export TEST_SUCCESS=0 || export TEST_SUCCESS=1
229+
cd tests/deployment/ && python3 -m unittest test && export TEST_SUCCESS=0 || export TEST_SUCCESS=1
230230
kill $(jps | awk '/TypeDBServer/ {print $1}')
231231
exit $TEST_SUCCESS
232232
@@ -242,9 +242,12 @@ release:
242242
deploy-github:
243243
image: vaticle-ubuntu-22.04
244244
command: |
245-
export PATH="$HOME/.local/bin:$PATH"
246-
sudo apt install python3-pip -y
247-
python3 -m pip install -U pip
245+
export PYENV_ROOT="/opt/pyenv"
246+
pyenv install 3.7.9
247+
pyenv global 3.7.9
248+
sudo unlink /usr/bin/python3
249+
sudo ln -s $(which python3) /usr/bin/python3
250+
sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.7.9/lib/python3.7/site-packages/lsb_release.py
248251
python3 -m pip install certifi
249252
export ARTIFACT_USERNAME=$REPO_VATICLE_USERNAME
250253
export ARTIFACT_PASSWORD=$REPO_VATICLE_PASSWORD
@@ -256,9 +259,12 @@ release:
256259
deploy-pip-release:
257260
image: vaticle-ubuntu-20.04
258261
command: |
259-
export PATH="$HOME/.local/bin:$PATH"
260-
sudo apt install python3-pip -y
261-
python3 -m pip install -U pip
262+
export PYENV_ROOT="/opt/pyenv"
263+
pyenv install 3.7.9
264+
pyenv global 3.7.9
265+
sudo unlink /usr/bin/python3
266+
sudo ln -s $(which python3) /usr/bin/python3
267+
sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.7.9/lib/python3.7/site-packages/lsb_release.py
262268
export ARTIFACT_USERNAME=$REPO_VATICLE_USERNAME
263269
export ARTIFACT_PASSWORD=$REPO_VATICLE_PASSWORD
264270
bazel run @vaticle_dependencies//distribution/artifact:create-netrc

0 commit comments

Comments
 (0)