git: 4d0c5b9d398b - main - sysutils/py-drmaa: Fix build with setuptools 58.0.0+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Mar 2022 13:51:00 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4d0c5b9d398b41f3822d1921dbcb8ef476eaf649
commit 4d0c5b9d398b41f3822d1921dbcb8ef476eaf649
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-03-25 13:34:24 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-03-25 13:38:21 +0000
sysutils/py-drmaa: Fix build with setuptools 58.0.0+
With hat: python
---
sysutils/py-drmaa/files/patch-2to3 | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/sysutils/py-drmaa/files/patch-2to3 b/sysutils/py-drmaa/files/patch-2to3
new file mode 100644
index 000000000000..1e6268bbbd01
--- /dev/null
+++ b/sysutils/py-drmaa/files/patch-2to3
@@ -0,0 +1,28 @@
+--- drmaa/nt.py.orig 2010-05-27 10:25:17 UTC
++++ drmaa/nt.py
+@@ -31,7 +31,7 @@ def namedtuple(typename, field_names, verbose=False):
+
+ # Parse and validate the field names. Validation serves two purposes,
+ # generating informative error messages and preventing template injection attacks.
+- if isinstance(field_names, basestring):
++ if isinstance(field_names, str):
+ field_names = field_names.replace(',', ' ').split() # names separated by whitespace and/or commas
+ field_names = tuple(field_names)
+ for name in (typename,) + field_names:
+@@ -81,13 +81,13 @@ def namedtuple(typename, field_names, verbose=False):
+ for i, name in enumerate(field_names):
+ template += ' %s = property(itemgetter(%d))\n' % (name, i)
+ if verbose:
+- print template
++ print(template)
+
+ # Execute the template string in a temporary namespace
+ namespace = dict(itemgetter=_itemgetter)
+ try:
+- exec template in namespace
+- except SyntaxError, e:
++ exec(template, namespace)
++ except SyntaxError as e:
+ raise SyntaxError(e.message + ':\n' + template)
+ result = namespace[typename]
+