summaryrefslogtreecommitdiff
path: root/security/py-signedjson/files
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2020-07-11 18:10:59 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2020-07-11 18:10:59 +0000
commitff5bf8c5b45dd35b7b9afdf2ef0ebacf014a25b6 (patch)
tree77531c15bcb780dffbe6722d7ffb050b6b5047a5 /security/py-signedjson/files
parentAdd MYSQL and POSTGRESQL options (diff)
Fix RUN_DEPENDS
- Bump PORTREVISION for dependency change devel/py-importlib-metadata is not required for python 3.8+.
Notes
Notes: svn path=/head/; revision=542025
Diffstat (limited to 'security/py-signedjson/files')
-rw-r--r--security/py-signedjson/files/patch-setup.py13
-rw-r--r--security/py-signedjson/files/patch-signedjson-__init__.py16
2 files changed, 29 insertions, 0 deletions
diff --git a/security/py-signedjson/files/patch-setup.py b/security/py-signedjson/files/patch-setup.py
new file mode 100644
index 000000000000..d66a932f919f
--- /dev/null
+++ b/security/py-signedjson/files/patch-setup.py
@@ -0,0 +1,13 @@
+Obtained from: https://github.com/matrix-org/python-signedjson/commit/c40c83f844fee3c1c7b0c5d1508f87052334b4e5
+
+--- setup.py.orig 2020-03-27 19:41:34 UTC
++++ setup.py
+@@ -41,7 +41,7 @@ setup(
+ "pynacl>=0.3.0",
+ "typing_extensions>=3.5",
+ 'typing>=3.5;python_version<"3.5"',
+- "importlib_metadata",
++ 'importlib_metadata;python_version<"3.8"',
+ ],
+ long_description=read_file(("README.rst",)),
+ keywords="json",
diff --git a/security/py-signedjson/files/patch-signedjson-__init__.py b/security/py-signedjson/files/patch-signedjson-__init__.py
new file mode 100644
index 000000000000..039fce0399ed
--- /dev/null
+++ b/security/py-signedjson/files/patch-signedjson-__init__.py
@@ -0,0 +1,16 @@
+Obtained from: https://github.com/matrix-org/python-signedjson/commit/c40c83f844fee3c1c7b0c5d1508f87052334b4e5
+
+--- signedjson/__init__.py.orig 2020-03-27 19:41:34 UTC
++++ signedjson/__init__.py
+@@ -12,7 +12,10 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+-from importlib_metadata import version, PackageNotFoundError
++try:
++ from importlib.metadata import version, PackageNotFoundError
++except ImportError: # pragma: nocover
++ from importlib_metadata import version, PackageNotFoundError
+
+ try:
+ __version__ = version(__name__)