From b024a42e6f687f56f9e4ecab7266df1da3c24981 Mon Sep 17 00:00:00 2001 From: joshua Date: Mon, 24 Apr 2023 12:42:54 +0100 Subject: [PATCH] Downgrade pip deploy and test to use Python 3.7.9 to get around PEP440 requirements --- .factory/automation.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.factory/automation.yml b/.factory/automation.yml index 3f8a9f19..65def18a 100644 --- a/.factory/automation.yml +++ b/.factory/automation.yml @@ -220,25 +220,29 @@ build: branch: master type: foreground command: | - export PATH="$HOME/.local/bin:$PATH" - sudo apt-get update - sudo apt install python3-pip -y - python3 -m pip install -U pip + export PYENV_ROOT="/opt/pyenv" + pyenv install 3.7.9 + pyenv global 3.7.9 + sudo unlink /usr/bin/python3 + sudo ln -s $(which python3) /usr/bin/python3 + sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.7.9/lib/python3.7/site-packages/lsb_release.py export DEPLOY_PIP_USERNAME=$REPO_VATICLE_USERNAME export DEPLOY_PIP_PASSWORD=$REPO_VATICLE_PASSWORD bazel run --define version=$(git rev-parse HEAD) //:deploy-pip -- snapshot test-deployment-pip: - image: vaticle-ubuntu-22.04 + image: vaticle-ubuntu-20.04 dependencies: [deploy-pip-snapshot] filter: owner: vaticle branch: master type: foreground command: | - export PATH="$HOME/.local/bin:$PATH" - sudo apt-get update - sudo apt install python3-pip -y - python3 -m pip install -U pip + export PYENV_ROOT="/opt/pyenv" + pyenv install 3.7.9 + pyenv global 3.7.9 + sudo unlink /usr/bin/python3 + sudo ln -s $(which python3) /usr/bin/python3 + sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.7.9/lib/python3.7/site-packages/lsb_release.py bazel run //tests:typedb-extractor -- typedb-all-linux ./typedb-all-linux/typedb server & python3 -m pip install --extra-index-url https://repo.vaticle.com/repository/pypi-snapshot/simple typedb-client==0.0.0-$FACTORY_COMMIT