From 64fd232ae4f565b45d9ed5e1b86e53fdbfe17e5a Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Mon, 7 Dec 2020 15:16:50 +0100 Subject: [PATCH] fix on debian package build --- build_deb.sh | 1 + debian-files/smasch.py | 1 + debian-template/postinst | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build_deb.sh b/build_deb.sh index 12983c6a..48a3aafa 100644 --- a/build_deb.sh +++ b/build_deb.sh @@ -28,6 +28,7 @@ echo "UPLOAD_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)),'../ echo "SECRET_KEY ='tmp'" >> smash/local_settings.py echo "STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'" >> smash/local_settings.py npm install +export PYTHONDONTWRITEBYTECODE=1 ./manage.py collectstatic rm -rf node_modules mv tmp-static/npm node_modules diff --git a/debian-files/smasch.py b/debian-files/smasch.py index f3280119..80f457e5 100644 --- a/debian-files/smasch.py +++ b/debian-files/smasch.py @@ -58,3 +58,4 @@ LOGGING = { } TWO_FACTOR_SMS_GATEWAY = "web.nexmo_gateway.Nexmo" +NPM_ROOT_PATH = '/usr/lib/smasch/' diff --git a/debian-template/postinst b/debian-template/postinst index 3994404a..c6f237dd 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 --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 + 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 } || { 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): " -- GitLab