aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfourtysixandtwo <fourtysixandtwo@sliderr.net>2024-09-09 12:43:56 -0600
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-09-14 23:37:00 +0700
commit027439995d5a93d52198ddf249708605f14fd5d9 (patch)
tree87b78b8ce1345e262bebeb81932d80f053a2e9c9
parent8bbb7a14778341b1119be4c4bc2bba76f19b0075 (diff)
python/python3-daemon: Temp workaround for new setuptools.
Problem is upstream and they are aware. Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--python/python3-daemon/packaging-version.patch73
-rw-r--r--python/python3-daemon/python3-daemon.SlackBuild5
2 files changed, 78 insertions, 0 deletions
diff --git a/python/python3-daemon/packaging-version.patch b/python/python3-daemon/packaging-version.patch
new file mode 100644
index 000000000000..e488b3cacc3d
--- /dev/null
+++ b/python/python3-daemon/packaging-version.patch
@@ -0,0 +1,73 @@
+From 3bbc46967d35cd7e05677018bdc9d552efaeea3e Mon Sep 17 00:00:00 2001
+From: Ben Finney <ben+python@benfinney.id.au>
+Date: Mar 08 2023 07:02:47 +0000
+Subject: Use explicitly-maintained ‘packaging.version’ for version string parsing.
+
+
+---
+
+#diff --git a/ChangeLog b/ChangeLog
+#index bba4b5a..f5ee1e0 100644
+#--- a/ChangeLog
+#+++ b/ChangeLog
+#@@ -14,9 +14,14 @@ Version NEXT
+# :Released: FUTURE
+# :Maintainer: UNKNOWN <unknown@example.org>
+#
+#-Changes:
+#+Bugs Fixed:
+#+
+#+* Migrate to use the explicitly-maintained ‘packaging’ library.
+#+
+#+ The package bundled in ‘setuptools.extern.packaging’ is to help make that
+#+ package self-contained, but is not a supported API.
+#
+#-* None.
+#+ Closes: Pagure #73. Thanks to Michał Górny for the report.
+#
+#
+# Version 3.0.1
+diff --git a/test_version.py b/test_version.py
+index c43cd36..d6095e4 100644
+--- a/test_version.py
++++ b/test_version.py
+@@ -20,10 +20,10 @@ import unittest.mock
+ import docutils
+ import docutils.nodes
+ import docutils.writers
++from packaging.version import InvalidVersion
+ import setuptools
+ import setuptools.command
+ import setuptools.dist
+-from setuptools.extern.packaging.version import InvalidVersion
+ import testscenarios
+ import testtools
+
+diff --git a/version.py b/version.py
+index 20d3ef3..2d7d048 100644
+--- a/version.py
++++ b/version.py
+@@ -31,12 +31,12 @@ import re
+ import sys
+ import textwrap
+
++import packaging.version
+ import setuptools
+ import setuptools.command.build
+ import setuptools.command.build_py
+ import setuptools.command.egg_info
+ import setuptools.dist
+-import setuptools.extern.packaging.version
+
+
+ def ensure_class_bases_begin_with(namespace, class_name, base_class):
+@@ -186,7 +186,7 @@ class ChangeLogEntry:
+ # A valid non-version value.
+ return None
+
+- valid_version = setuptools.extern.packaging.version.Version(value)
++ valid_version = packaging.version.Version(value)
+
+ @classmethod
+ def validate_maintainer(cls, value):
+
diff --git a/python/python3-daemon/python3-daemon.SlackBuild b/python/python3-daemon/python3-daemon.SlackBuild
index bfb082a12a37..d07bc2e09de5 100644
--- a/python/python3-daemon/python3-daemon.SlackBuild
+++ b/python/python3-daemon/python3-daemon.SlackBuild
@@ -80,6 +80,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# 46and2: needs following patch minus Changelog fix or will not build
+# https://pagure.io/python-daemon/c/3bbc4696
+# upstream is still working on proper fix, see issue #94
+patch -p1 < $CWD/packaging-version.patch
+
PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
export PYTHONPATH=/opt/python$PYVER/site-packages/