فهرست منبع

adjustment

* requirements.txt is not used anymore
Chris Vogel 1 سال پیش
والد
کامیت
ca97921898
2فایلهای تغییر یافته به همراه11 افزوده شده و 1 حذف شده
  1. 4 1
      scripts/_common.sh
  2. 7 0
      scripts/upgrade

+ 4 - 1
scripts/_common.sh

@@ -765,7 +765,10 @@ flohmarkt_ynh_venv_requirements() {
     set -o nounset
     set -x
     $flohmarkt_venv_dir/bin/python3 -m ensurepip
-    $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_app_dir/requirements.txt"
+    # starting with 0.6.1~ynh1 dependencies are not in requirements.txt anymore,
+    # but in pyproject.toml
+    # $flohmarkt_venv_dir/bin/pip3 install -r "$flohmarkt_app_dir/requirements.txt"
+    $flohmarkt_venv_dir/bin/pip3 install "$flohmarkt_app_dir"
   )
 }
 

+ 7 - 0
scripts/upgrade

@@ -24,6 +24,13 @@ then
   flohmarkt_ynh_upgrade_path_ynh5
 fi
 
+# Upgrade from 0.2.0: remove requirements.txt which is replaced by pyproject.toml
+if ynh_compare_current_package_version --comparison lt --version 0.6.1~ynh1 &&
+  ( [[ "$upgrade_type" == UPGRADE_PACKAGE ]] || [[ "$upgrade_type" == UPGRADE_APP ]] )
+then 
+  ynh_secure_remove "${flohmarkt_app_dir}/requirements.txt"
+fi
+
 # upgrade couchdb
 ynh_script_progression --message="Upgrading CouchDB..." --weight=50
 flohmarkt_ynh_up_inst_couchdb