changeset 8986:0a9ddb8cd8c1 stable

setup: avoid setuptools 67 - it can't handle celery's broken pytz dependency With setuptools 67 or later, launching Kallithea fails as: $ gearbox serve -c my.ini --reload 15:56:54,111 ERROR [gearbox] Expected closing RIGHT_PARENTHESIS pytz (>dev) ~^ The `packaging` vendored in setuptools cannot handle the broken syntax `Requires-Dist: pytz (>dev)` in venv/lib/python3.11/site-packages/celery-5.0.5.dist-info/METADATA . The old celery version currently used by Kallithea is wrong, and setuptools has moved on after a reasonable grace period. We thus have to work around and avoid latest setuptools. See https://github.com/pypa/setuptools/issues/3889 .
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 13 Apr 2023 13:54:24 +0200
parents 84b4fc9db016
children d6d3cb5991e2
files Jenkinsfile docs/contributing.rst docs/installation.rst docs/installation_win.rst docs/installation_win_old.rst scripts/dbmigrate-test scripts/validate-commits scripts/validate-minimum-dependency-versions
diffstat 8 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Jenkinsfile	Sun Apr 09 16:38:31 2023 +0200
+++ b/Jenkinsfile	Thu Apr 13 13:54:24 2023 +0200
@@ -28,7 +28,7 @@
         def virtualenvscript = """$createvirtualenv
             $activatevirtualenv
             python -m pip install --upgrade pip
-            pip install --upgrade setuptools
+            pip install --upgrade "setuptools<67"
             pip install --upgrade pylint
             pip install --upgrade pytest-cov
             """
--- a/docs/contributing.rst	Sun Apr 09 16:38:31 2023 +0200
+++ b/docs/contributing.rst	Thu Apr 13 13:54:24 2023 +0200
@@ -33,7 +33,7 @@
         cd kallithea
         python3 -m venv venv
         . venv/bin/activate
-        pip install --upgrade pip setuptools
+        pip install --upgrade pip "setuptools<67"
         pip install --upgrade -e . -r dev_requirements.txt python-ldap python-pam
         kallithea-cli config-create my.ini
         kallithea-cli db-create -c my.ini --user=user --email=user@example.com --password=password --repos=/tmp
--- a/docs/installation.rst	Sun Apr 09 16:38:31 2023 +0200
+++ b/docs/installation.rst	Thu Apr 13 13:54:24 2023 +0200
@@ -55,7 +55,7 @@
         cd kallithea
         python3 -m venv venv
         . venv/bin/activate
-        pip install --upgrade pip setuptools
+        pip install --upgrade pip "setuptools<67"
         pip install --upgrade -e .
         python3 setup.py compile_catalog   # for translation of the UI
 
@@ -98,7 +98,7 @@
   bash shell::
 
     . /srv/kallithea/venv/bin/activate
-    pip install --upgrade pip setuptools
+    pip install --upgrade pip "setuptools<67"
 
 .. note:: You can't use UNIX ``sudo`` to source the ``activate`` script; it
    will "activate" a shell that terminates immediately.
--- a/docs/installation_win.rst	Sun Apr 09 16:38:31 2023 +0200
+++ b/docs/installation_win.rst	Thu Apr 13 13:54:24 2023 +0200
@@ -104,7 +104,7 @@
 
   cd C:\Kallithea\Env\Scripts
   activate
-  pip install --upgrade pip setuptools
+  pip install --upgrade pip "setuptools<67"
 
 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
 (depending of your folder structure). Then type::
--- a/docs/installation_win_old.rst	Sun Apr 09 16:38:31 2023 +0200
+++ b/docs/installation_win_old.rst	Thu Apr 13 13:54:24 2023 +0200
@@ -170,7 +170,7 @@
 
   cd C:\Kallithea\Env\Scripts (or similar)
   activate
-  pip install --upgrade pip setuptools
+  pip install --upgrade pip "setuptools<67"
 
 The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
 (depending of your folder structure). Then type::
--- a/scripts/dbmigrate-test	Sun Apr 09 16:38:31 2023 +0200
+++ b/scripts/dbmigrate-test	Thu Apr 13 13:54:24 2023 +0200
@@ -94,7 +94,7 @@
     (
         cd "$prefix"
         . "$prefix-env/bin/activate"
-        pip install --quiet --upgrade pip setuptools mercurial $EXTRA
+        pip install --quiet --upgrade pip "setuptools<67" mercurial $EXTRA
         pip install --quiet -e .
     )
 }
--- a/scripts/validate-commits	Sun Apr 09 16:38:31 2023 +0200
+++ b/scripts/validate-commits	Thu Apr 13 13:54:24 2023 +0200
@@ -42,7 +42,7 @@
     cleanup
     python3 -m venv "$venv"
     source "$venv/bin/activate"
-    pip install --upgrade pip setuptools
+    pip install --upgrade pip "setuptools<67"
     pip install -e . -r dev_requirements.txt python-ldap python-pam
 
     # run-all-cleanup
--- a/scripts/validate-minimum-dependency-versions	Sun Apr 09 16:38:31 2023 +0200
+++ b/scripts/validate-minimum-dependency-versions	Thu Apr 13 13:54:24 2023 +0200
@@ -30,7 +30,7 @@
 
 python3 -m venv "$venv"
 source "$venv/bin/activate"
-pip install --upgrade pip setuptools
+pip install --upgrade pip "setuptools<67"
 pip install -e . -r "$min_requirements" python-ldap python-pam 2> >(tee "$log" >&2)
 
 # Treat any message on stderr as a problem, for the caller to interpret.