Date: Fri, 25 Mar 2022 13:49:52 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 5bacf5f90c54 - main - devel/py-anyjson: Fix build with setuptools 58.0.0+ Message-ID: <202203251349.22PDnqoE027917@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=5bacf5f90c545d4bfc9a7a745436661396b92c84 commit 5bacf5f90c545d4bfc9a7a745436661396b92c84 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-03-25 13:32:12 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-03-25 13:38:07 +0000 devel/py-anyjson: Fix build with setuptools 58.0.0+ With hat: python --- devel/py-anyjson/files/patch-2to3 | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/devel/py-anyjson/files/patch-2to3 b/devel/py-anyjson/files/patch-2to3 new file mode 100644 index 000000000000..081cab6becfe --- /dev/null +++ b/devel/py-anyjson/files/patch-2to3 @@ -0,0 +1,44 @@ +--- anyjson/__init__.py.orig 2012-06-21 23:08:51 UTC ++++ anyjson/__init__.py +@@ -85,8 +85,8 @@ class _JsonImplementation(object): + TypeError if the object could not be serialized.""" + try: + return self._encode(data) +- except self._encode_error, exc: +- raise TypeError, TypeError(*exc.args), sys.exc_info()[2] ++ except self._encode_error as exc: ++ raise TypeError(TypeError(*exc.args)).with_traceback(sys.exc_info()[2]) + serialize = dumps + + def loads(self, s): +@@ -97,8 +97,8 @@ class _JsonImplementation(object): + if self._filedecode and not isinstance(s, basestring): + return self._filedecode(StringIO(s)) + return self._decode(s) +- except self._decode_error, exc: +- raise ValueError, ValueError(*exc.args), sys.exc_info()[2] ++ except self._decode_error as exc: ++ raise ValueError(ValueError(*exc.args)).with_traceback(sys.exc_info()[2]) + deserialize = loads + + +@@ -117,7 +117,7 @@ if __name__ == "__main__": + # We do NOT try to load a compatible module because that may throw an + # exception, which renders the package uninstallable with easy_install + # (It trys to execfile the script when installing, to make sure it works) +- print "Running anyjson as a stand alone script is not supported" ++ print("Running anyjson as a stand alone script is not supported") + sys.exit(1) + else: + for modspec in _modules: +--- setup.py.orig 2012-06-21 22:59:59 UTC ++++ setup.py +@@ -2,8 +2,6 @@ import os + import sys + + extra = {} +-if sys.version_info >= (3, 0): +- extra.update(use_2to3=True) + + try: + from setuptools import setup, find_packages
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203251349.22PDnqoE027917>