From 8d03116206a6f6df5b4d401ddb845154b28e5b2e Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Wed, 2 Dec 2020 12:00:50 +0100 Subject: [PATCH] pip 20.3 use new dependency resolver that breaks current config --- .gitlab-ci.yml | 4 ++-- Dockerfile | 2 +- debian-template/postinst | 4 ++-- readme.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a493401d..aa60a1b1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,8 +11,8 @@ variables: stage: test before_script: - apt-get update && apt-get install -y --allow-unauthenticated libsasl2-dev libssl-dev locales locales-all - - pip install -r requirements.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/ - - pip install -r requirements-dev.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/ + - pip install --use-deprecated=legacy-resolver -r requirements.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/ + - pip install --use-deprecated=legacy-resolver -r requirements-dev.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/ test_postgres: <<: *test_definition diff --git a/Dockerfile b/Dockerfile index 0b52e1a3..955f7115 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ RUN mkdir /code WORKDIR /code RUN apt-get update && apt-get install -y --allow-unauthenticated libsasl2-dev libssl-dev locales locales-all ADD requirements* /code/ -RUN pip install -r requirements.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/ && pip install -r requirements-dev.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/ # --use-feature=2020-resolver +RUN pip install --use-deprecated=legacy-resolver -r requirements.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/ && pip install --use-deprecated=legacy-resolver -r requirements-dev.txt --default-timeout=180 -i https://pypi.lcsb.uni.lu/simple/ # --use-feature=2020-resolver ADD . /code/ RUN cp local_settings_ci.py smash/smash/local_settings.py WORKDIR /code/smash diff --git a/debian-template/postinst b/debian-template/postinst index c6f237dd..3994404a 100644 --- a/debian-template/postinst +++ b/debian-template/postinst @@ -26,8 +26,8 @@ fi echo "Installing python dependencies" { - source /usr/lib/smasch/env/bin/activate && pip install -r /usr/lib/smasch/requirements.txt --log $LOG_FILE - source /usr/lib/smasch/env/bin/activate && pip install -r /usr/lib/smasch/requirements-dev.txt --log $LOG_FILE + source /usr/lib/smasch/env/bin/activate && pip install -r --use-deprecated=legacy-resolver /usr/lib/smasch/requirements.txt --log $LOG_FILE + source /usr/lib/smasch/env/bin/activate && pip install -r --use-deprecated=legacy-resolver /usr/lib/smasch/requirements-dev.txt --log $LOG_FILE } || { echo "There was an issue when installing python dependencies." >> $LOG_FILE echo "There was an issue when installing python dependencies. Reinstall of smasch could help (in case you are upgrading smasch the data should not be lost in the process): " diff --git a/readme.md b/readme.md index 384c6205..d845098c 100644 --- a/readme.md +++ b/readme.md @@ -26,7 +26,7 @@ python manage.py createsuperuser - `cd scheduling-system` - `virtualenv env` to create new virtualenv (contains clean python working environment) - `. env/bin/activate` (to start using virtualenv) - - `pip install -r requirements.txt` to install project's dependencies + - `pip install --use-deprecated=legacy-resolver -r requirements.txt` to install project's dependencies - Create `local_settings.py` file in `(./scheduling-system)/smash/smash` directory by copying the template in `(./scheduling-system)/smash/smash/local_settings.template` and edit your local_setttings.py file to change your database connection data. - Update migration db scrpit from file structure (`./scheduling-system/smash/manage.py makemigrations`) -- GitLab