aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-06-03 13:56:19 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-06-03 13:59:03 +0000
commitc630dbc4827824a39d9f5872470e015be83e2d4c (patch)
treeee771883a7a6dcbab2673740b03db58b585bbde0
parenteab9e318306d8cdf8a3a3a304e0f4d2d29215c6b (diff)
downloadports-c630dbc4827824a39d9f5872470e015be83e2d4c.tar.gz
ports-c630dbc4827824a39d9f5872470e015be83e2d4c.zip
benchmarks/py-zopkio: Fix build with setuptools 58.0.0+
- Add USES=dos2unix - While I'm here, update GH_ACCOUNT With hat: python
-rw-r--r--benchmarks/py-zopkio/Makefile4
-rw-r--r--benchmarks/py-zopkio/distinfo5
-rw-r--r--benchmarks/py-zopkio/files/patch-2to366
3 files changed, 71 insertions, 4 deletions
diff --git a/benchmarks/py-zopkio/Makefile b/benchmarks/py-zopkio/Makefile
index 72670a1fdec9..16f8332e62af 100644
--- a/benchmarks/py-zopkio/Makefile
+++ b/benchmarks/py-zopkio/Makefile
@@ -16,9 +16,9 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}naarad>=1.0.15:benchmarks/py-naarad@${PY_FLA
${PYTHON_PKGNAMEPREFIX}paramiko>=1.10.1:security/py-paramiko@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}junit-xml>0:textproc/py-junit-xml@${PY_FLAVOR} \
-USES= python:3.6+
+USES= dos2unix python:3.6+
USE_PYTHON= autoplist concurrent distutils
USE_GITHUB= yes
-GH_ACCOUNT= linkedin
+GH_ACCOUNT= LinkedInAttic
.include <bsd.port.mk>
diff --git a/benchmarks/py-zopkio/distinfo b/benchmarks/py-zopkio/distinfo
index 95c1e3966fd5..54f2dce9859b 100644
--- a/benchmarks/py-zopkio/distinfo
+++ b/benchmarks/py-zopkio/distinfo
@@ -1,2 +1,3 @@
-SHA256 (linkedin-Zopkio-0.2.5_GH0.tar.gz) = e33009e558e6c8cc2c04d8bdacc3bec27a5c14346692146f7896fc0cb45233c4
-SIZE (linkedin-Zopkio-0.2.5_GH0.tar.gz) = 2422419
+TIMESTAMP = 1653164376
+SHA256 (LinkedInAttic-Zopkio-0.2.5_GH0.tar.gz) = e33009e558e6c8cc2c04d8bdacc3bec27a5c14346692146f7896fc0cb45233c4
+SIZE (LinkedInAttic-Zopkio-0.2.5_GH0.tar.gz) = 2422419
diff --git a/benchmarks/py-zopkio/files/patch-2to3 b/benchmarks/py-zopkio/files/patch-2to3
new file mode 100644
index 000000000000..c41a997d4208
--- /dev/null
+++ b/benchmarks/py-zopkio/files/patch-2to3
@@ -0,0 +1,66 @@
+--- zopkio/__main__.py.orig 2022-05-21 20:20:16 UTC
++++ zopkio/__main__.py
+@@ -110,7 +110,7 @@ def call_main(args):
+ if args.output_dir is not None:
+ runtime.set_output_dir(args.output_dir)
+ except ValueError as e:
+- print str(e)
++ print(str(e))
+ raise
+
+ # Set up logging.
+@@ -125,7 +125,7 @@ def call_main(args):
+ config_overrides = utils.parse_config_list(args.config_overrides)
+ except ValueError as e:
+ logger.error(str(e))
+- print("Error in processing command line arguments:\n {0}".format(traceback.format_exc()))
++ print(("Error in processing command line arguments:\n {0}".format(traceback.format_exc())))
+ raise
+
+ runtime.set_machines(machines)
+@@ -149,7 +149,7 @@ def call_main(args):
+ else:
+ test_runner = TestRunner(args.testfile, args.test_list, config_overrides)
+ except BaseException as e:
+- print("Error setting up testrunner:\n%s" % traceback.format_exc())
++ print(("Error setting up testrunner:\n%s" % traceback.format_exc()))
+ raise ValueError(e.message)
+
+ test_runner.run()
+--- zopkio/deployer.py.orig 2022-05-21 20:20:16 UTC
++++ zopkio/deployer.py
+@@ -31,13 +31,12 @@ import zopkio.runtime as runtime
+
+ logger = logging.getLogger(__name__)
+
+-class Deployer(object):
++class Deployer(object, metaclass=ABCMeta):
+ """Abstract class specifying required contract for a Deployer
+
+ A deployer implements both the basic contracts for deployment as well as keeping
+ track of the state of deployed applications
+ """
+- __metaclass__ = ABCMeta
+ _signalnames = {signal.SIGHUP : "HANGING UP ON",
+ signal.SIGTERM : "TERMINATING",
+ signal.SIGKILL : "KILLING",
+@@ -261,7 +260,7 @@ class Deployer(object):
+ for f in logs:
+ try:
+ mode = ftp.stat(f).st_mode
+- except IOError, e:
++ except IOError as e:
+ if e.errno == errno.ENOENT:
+ logger.error("Log file " + f + " does not exist on " + hostname)
+ pass
+--- zopkio/remote_host_helper.py.orig 2022-05-21 20:20:16 UTC
++++ zopkio/remote_host_helper.py
+@@ -147,7 +147,7 @@ def copy_dir(ftp, filename, outputdir, prefix, pattern
+ """
+ try:
+ mode = ftp.stat(filename).st_mode
+- except IOError, e:
++ except IOError as e:
+ if e.errno == errno.ENOENT:
+ logger.error("Log file " + filename + " does not exist")
+ pass