diff options
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/patches/python3.12.patch | 23 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | versioneer.py | 4 |
4 files changed, 32 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index bb2b3b3..bebef38 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +q2-sample-classifier (2023.7.0-2) unstable; urgency=medium + + * python3.12.patch: new: port versioneer.py. (Closes: #1058220) + + -- Étienne Mollier <emollier@debian.org> Thu, 14 Dec 2023 19:06:53 +0100 + q2-sample-classifier (2023.7.0-1) unstable; urgency=medium * New upstream version 2023.7.0 diff --git a/debian/patches/python3.12.patch b/debian/patches/python3.12.patch new file mode 100644 index 0000000..ecd4137 --- /dev/null +++ b/debian/patches/python3.12.patch @@ -0,0 +1,23 @@ +Description: fix versioneer.py for python3.12. + This probably ought to be fully refreshed, but the change is sufficient for + the Python 3.12 version bump. +Author: Étienne Mollier <emollier@debian.org> +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1058220 +Forwarded: https://github.com/qiime2/q2-sample-classifier/pull/229 +Last-Update: 2023-12-14 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- q2-sample-classifier.orig/versioneer.py ++++ q2-sample-classifier/versioneer.py +@@ -340,9 +340,9 @@ + # configparser.NoOptionError (if it lacks "VCS="). See the docstring at + # the top of versioneer.py for instructions on writing your setup.cfg . + setup_cfg = os.path.join(root, "setup.cfg") +- parser = configparser.SafeConfigParser() ++ parser = configparser.ConfigParser() + with open(setup_cfg, "r") as f: +- parser.readfp(f) ++ parser.read_file(f) + VCS = parser.get("versioneer", "VCS") # mandatory + + def get(parser, name): diff --git a/debian/patches/series b/debian/patches/series index bee42c3..1b7b2d5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ reduce-precision-in-tests.patch fix-autopkgtest.patch sklearn-1.2.1.patch convert-estimator.patch +python3.12.patch diff --git a/versioneer.py b/versioneer.py index a5e7a20..886455f 100644 --- a/versioneer.py +++ b/versioneer.py @@ -340,9 +340,9 @@ def get_config_from_root(root): # configparser.NoOptionError (if it lacks "VCS="). See the docstring at # the top of versioneer.py for instructions on writing your setup.cfg . setup_cfg = os.path.join(root, "setup.cfg") - parser = configparser.SafeConfigParser() + parser = configparser.ConfigParser() with open(setup_cfg, "r") as f: - parser.readfp(f) + parser.read_file(f) VCS = parser.get("versioneer", "VCS") # mandatory def get(parser, name): |