Use pip-sync to make sure that dep cache tarball can go safely stale

This "fixes" egg-links in a really hacky way to compensate for the lack
of a real relocatable virtualenv.
This commit is contained in:
Tim McCormack
2020-04-23 17:47:29 +00:00
parent 0a079e757c
commit d435f4cd3e
3 changed files with 13 additions and 2 deletions

View File

@@ -61,7 +61,8 @@ pull: ## update the Docker image used by "make shell"
docker pull edxops/edxapp:latest
requirements: ## install development environment requirements
pip install -qr requirements/edx/development.txt --exists-action w
pip install -qr requirements/edx/pip-tools.txt
pip-sync -q requirements/edx/development.txt requirements/edx/private.*
shell: ## launch a bash shell in a Docker container with all edx-platform dependencies installed
docker run -it -e "NO_PYTHON_UNINSTALL=1" -e "PIP_INDEX_URL=https://pypi.python.org/simple" -e TERM \

View File

@@ -45,6 +45,12 @@ fi
# Activate the Python virtualenv
source $VENV_PATH/edx-venv/bin/activate
# Hack to fix up egg-link files given that the virtualenv is not relocatable
sed -i "s|^/home/jenkins/shallow-clone|`pwd`|" -- \
$VENV_PATH/edx-venv/lib/python*/site-packages/*.egg-link
pip install -qr requirements/edx/pip-tools.txt
pip-sync -q requirements/edx/testing.txt requirements/edx/django.txt
# add the node packages dir to PATH
PATH=$PATH:node_modules/.bin

View File

@@ -18,6 +18,10 @@ rm -rf $venv
tar -C $venv_parent -xf /home/jenkins/edx-venv_clean-${PYTHON_VERSION}.tar.gz
source $venv/bin/activate
pip install -q -r ${DJANGO_REQUIREMENT} -r requirements/edx/testing.txt
# Hack to fix up egg-link files given that the virtualenv is not relocatable
sed -i "s|\(^/home/jenkins\)/shallow-clone|\1/edx-platform|" -- \
$venv/lib/python*/site-packages/*.egg-link
pip install -qr requirements/edx/pip-tools.txt
pip-sync -q requirements/edx/testing.txt "${DJANGO_REQUIREMENT}"
mkdir reports