pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/py-cheroot Fix build with various Python versions.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c62e49926fe8
branches:  trunk
changeset: 345944:c62e49926fe8
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Dec 21 23:51:56 2019 +0000

description:
Fix build with various Python versions.

diffstat:

 www/py-cheroot/distinfo                |   4 +++-
 www/py-cheroot/patches/patch-setup.cfg |  14 ++++++++++++++
 www/py-cheroot/patches/patch-setup.py  |  29 +++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 1 deletions(-)

diffs (64 lines):

diff -r 55791087d48d -r c62e49926fe8 www/py-cheroot/distinfo
--- a/www/py-cheroot/distinfo   Sat Dec 21 23:51:30 2019 +0000
+++ b/www/py-cheroot/distinfo   Sat Dec 21 23:51:56 2019 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.23 2019/09/18 20:23:12 adam Exp $
+$NetBSD: distinfo,v 1.24 2019/12/21 23:51:56 joerg Exp $
 
 SHA1 (cheroot-6.5.8.tar.gz) = fb7f6e0eab185b36ac754bd26fd3ca8a40b810e3
 RMD160 (cheroot-6.5.8.tar.gz) = 02e2cc0314d587e93b71b4cfd4353a0d0b8a9486
 SHA512 (cheroot-6.5.8.tar.gz) = 5abdf51ddb48b2519c795c5bcefce3d024dbf0fa0f881e94060444d9f5051a2e15b71aa0b3e2823dd7cd8b0e5f1b778580342332bbd3456c61e5493a84199966
 Size (cheroot-6.5.8.tar.gz) = 86158 bytes
+SHA1 (patch-setup.cfg) = a8e2352c4ca85c82fddc375bb3912a2581307679
+SHA1 (patch-setup.py) = d3261389a4422608df336940e73de6634633574c
diff -r 55791087d48d -r c62e49926fe8 www/py-cheroot/patches/patch-setup.cfg
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/py-cheroot/patches/patch-setup.cfg    Sat Dec 21 23:51:56 2019 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-setup.cfg,v 1.1 2019/12/21 23:51:56 joerg Exp $
+
+Python 2.7 doesn't extract the version otherwise.
+
+--- setup.cfg.orig     2019-12-21 21:46:41.214063294 +0000
++++ setup.cfg
+@@ -6,6 +6,7 @@ universal = 1
+ 
+ [metadata]
+ name = cheroot
++version = 6.5.8
+ url = https://cheroot.cherrypy.org
+ project_urls = 
+       CI: AppVeyor = https://ci.appveyor.com/project/cherrypy/cheroot
diff -r 55791087d48d -r c62e49926fe8 www/py-cheroot/patches/patch-setup.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/py-cheroot/patches/patch-setup.py     Sat Dec 21 23:51:56 2019 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-setup.py,v 1.1 2019/12/21 23:51:56 joerg Exp $
+
+Drop Python 2 hack that breaks more than it fixes.
+
+--- setup.py.orig      2019-09-05 09:21:53.000000000 +0000
++++ setup.py
+@@ -118,21 +118,4 @@ except ImportError:
+             opt['packages'] = setuptools.find_packages(**opt_packages_find)
+         return {'metadata': md, 'options': opt}
+ 
+-
+-setup_params = {}
+-declarative_setup_params = read_configuration('setup.cfg')
+-
+-# Patch incorrectly decoded package_dir option
+-# ``egg_info`` demands native strings failing with unicode under Python 2
+-# Ref https://github.com/pypa/setuptools/issues/1136
+-if 'package_dir' in declarative_setup_params['options']:
+-    declarative_setup_params['options']['package_dir'] = {
+-        str(k): str(v)
+-        for k, v in declarative_setup_params['options']['package_dir'].items()
+-    }
+-
+-setup_params = dict(setup_params, **declarative_setup_params['metadata'])
+-setup_params = dict(setup_params, **declarative_setup_params['options'])
+-
+-
+-__name__ == '__main__' and setuptools.setup(**setup_params)
++__name__ == '__main__' and setuptools.setup()



Home | Main Index | Thread Index | Old Index