From 2f224b3c1907821cf891d2cc16d3c2449919ce37 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sun, 6 Aug 2023 13:50:38 +0200 Subject: [PATCH] Packages - force python 3.9 (#5206) * specify python 3.9 * now support 12 too * rmove 12 * change deps * add dedicated wheel install * add dev headers (for rappidfuzz) --- .pkgr.yml | 5 +++-- contrib/packager.io/functions.sh | 1 + contrib/packager.io/postinstall.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pkgr.yml b/.pkgr.yml index 6ca6ae3a5e..f00c5b2d92 100644 --- a/.pkgr.yml +++ b/.pkgr.yml @@ -19,8 +19,9 @@ before: - contrib/packager.io/before.sh dependencies: - curl - - python3 - - python3-venv + - python3.9 + - python3.9-venv + - python3.9-dev - python3-pip - python3-cffi - python3-brotli diff --git a/contrib/packager.io/functions.sh b/contrib/packager.io/functions.sh index 05faa3ca90..efb4456d9b 100755 --- a/contrib/packager.io/functions.sh +++ b/contrib/packager.io/functions.sh @@ -235,6 +235,7 @@ function update_or_install() { # Run update as app user echo "# Updating InvenTree" + sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && pip install wheel" sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke update --no-frontend | sed -e 's/^/# inv update| /;'" # Make sure permissions are correct again diff --git a/contrib/packager.io/postinstall.sh b/contrib/packager.io/postinstall.sh index 54ee6166ac..03230b955a 100755 --- a/contrib/packager.io/postinstall.sh +++ b/contrib/packager.io/postinstall.sh @@ -23,7 +23,7 @@ export DATA_DIR=${APP_HOME}/data export SETUP_NGINX_FILE=${SETUP_NGINX_FILE:-/etc/nginx/sites-enabled/inventree.conf} export SETUP_ADMIN_PASSWORD_FILE=${CONF_DIR}/admin_password.txt export SETUP_NO_CALLS=${SETUP_NO_CALLS:-false} -export SETUP_PYTHON=${SETUP_PYTHON:-python3} +export SETUP_PYTHON=${SETUP_PYTHON:-python3.9} # SETUP_DEBUG can be set to get debug info # SETUP_EXTRA_PIP can be set to install extra pip packages # SETUP_PYTHON can be set to use a different python version