diff --git a/srcpkgs/python3-signedjson/patches/importlib_metadata.patch b/srcpkgs/python3-signedjson/patches/importlib_metadata.patch new file mode 100644 index 0000000000..d7553958cc --- /dev/null +++ b/srcpkgs/python3-signedjson/patches/importlib_metadata.patch @@ -0,0 +1,39 @@ +From c40c83f844fee3c1c7b0c5d1508f87052334b4e5 Mon Sep 17 00:00:00 2001 +From: MeggyCal +Date: Tue, 21 Apr 2020 18:55:37 +0200 +Subject: [PATCH] Do not require importlib_metadata on python 3.8. (#9) + +--- + setup.py | 2 +- + signedjson/__init__.py | 5 ++++- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 9c09760..c1cc299 100755 +--- a/setup.py ++++ b/setup.py +@@ -41,7 +41,7 @@ def read_file(path_segments): + "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/signedjson/__init__.py b/signedjson/__init__.py +index 6641e64..62faa5e 100644 +--- a/signedjson/__init__.py ++++ b/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__) diff --git a/srcpkgs/python3-signedjson/template b/srcpkgs/python3-signedjson/template index 60616a1791..bf9a8ddc12 100644 --- a/srcpkgs/python3-signedjson/template +++ b/srcpkgs/python3-signedjson/template @@ -1,15 +1,16 @@ # Template file for 'python3-signedjson' pkgname=python3-signedjson -version=1.1.0 -revision=4 -wrksrc="python-signedjson-${version}" +version=1.1.1 +revision=1 +wrksrc="signedjson-${version}" build_style=python3-module -hostmakedepends="python3-setuptools" -depends="python3-canonicaljson>=1.0.0 python3-unpaddedbase64>=1.0.1 - python3-pynacl" +hostmakedepends="python3-setuptools_scm" +depends="python3-canonicaljson python3-unpaddedbase64 python3-pynacl + python3-typing_extensions" +checkdepends="${depends} python3-pytest" short_desc="Sign JSON with Ed25519 signatures" -maintainer="Orphaned " +maintainer="Joel Beckmeyer " license="Apache-2.0" homepage="https://github.com/matrix-org/python-signedjson" -distfiles="https://github.com/matrix-org/python-signedjson/archive/v${version}.tar.gz" -checksum=1daf71f476245f7e5c2b06a1e0b617e800d7a39bbc943263e99f00536dbe9347 +distfiles="${PYPI_SITE}/s/signedjson/signedjson-${version}.tar.gz" +checksum=350586e7570ba208f7729dcda09d43f554ead0207a15e3e3695533ef3f720009