From 001ad92b11db1d9c873e49692fbd2cd21c2025f686725054878c7efeb1213d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 16 Apr 2020 12:14:21 +0000 Subject: [PATCH] Accepting request 794568 from home:mcalabkova:branches:devel:languages:python - Update to version 1.1.1 * Fix incorrect typing annotation for `decode_signing_key_base64`. * Reinstate `decode_verify_key_base64` function which was erroneously removed in 1.1.0. - Add no-importlib-on-py38.patch to fix build on Python 3.8 OBS-URL: https://build.opensuse.org/request/show/794568 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-signedjson?expand=0&rev=11 --- no-importlib-on-py38.patch | 29 +++++++++++++++++++++++++++++ python-signedjson-1.1.0.tar.xz | 3 --- python-signedjson.changes | 8 ++++++++ python-signedjson.spec | 32 +++++++++++++++++++++++++++----- signedjson-1.1.1.tar.gz | 3 +++ 5 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 no-importlib-on-py38.patch delete mode 100644 python-signedjson-1.1.0.tar.xz create mode 100644 signedjson-1.1.1.tar.gz diff --git a/no-importlib-on-py38.patch b/no-importlib-on-py38.patch new file mode 100644 index 0000000..9e2c6e6 --- /dev/null +++ b/no-importlib-on-py38.patch @@ -0,0 +1,29 @@ +Index: signedjson-1.1.1/setup.py +=================================================================== +--- signedjson-1.1.1.orig/setup.py ++++ signedjson-1.1.1/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", +Index: signedjson-1.1.1/signedjson/__init__.py +=================================================================== +--- signedjson-1.1.1.orig/signedjson/__init__.py ++++ signedjson-1.1.1/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: ++ from importlib_metadata import version, PackageNotFoundError + + try: + __version__ = version(__name__) diff --git a/python-signedjson-1.1.0.tar.xz b/python-signedjson-1.1.0.tar.xz deleted file mode 100644 index 504d066..0000000 --- a/python-signedjson-1.1.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:071bac9bfc78bbe67a3ba60f5886c3037875d09342cdfa7c5eb865bb1866368a -size 9652 diff --git a/python-signedjson.changes b/python-signedjson.changes index 87f5c55..4842b60 100644 --- a/python-signedjson.changes +++ b/python-signedjson.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Apr 15 13:50:16 UTC 2020 - Marketa Calabkova + +- Update to version 1.1.1 + * Fix incorrect typing annotation for `decode_signing_key_base64`. + * Reinstate `decode_verify_key_base64` function which was erroneously removed in 1.1.0. +- Add no-importlib-on-py38.patch to fix build on Python 3.8 + ------------------------------------------------------------------- Thu Feb 06 11:29:56 UTC 2020 - okurz@suse.com diff --git a/python-signedjson.spec b/python-signedjson.spec index fd86e96..3093235 100644 --- a/python-signedjson.spec +++ b/python-signedjson.spec @@ -18,18 +18,37 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %global modname signedjson +%bcond_without python2 Name: python-%{modname} -Version: 1.1.0 +Version: 1.1.1 Release: 0 Summary: Python module to sign JSON with Ed25519 signatures License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/matrix-org/%{name} -Source0: %{name}-%{version}.tar.xz -BuildRequires: %{python_module setuptools} +Source0: https://files.pythonhosted.org/packages/source/s/signedjson/%{modname}-%{version}.tar.gz +Patch0: no-importlib-on-py38.patch +BuildRequires: %{python_module PyNaCl >= 0.3.0} +BuildRequires: %{python_module canonicaljson >= 1.0.0} +BuildRequires: %{python_module importlib-metadata} +BuildRequires: %{python_module nose} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module typing_extensions >= 3.5} +BuildRequires: %{python_module unpaddedbase64 >= 1.0.1} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-PyNaCl >= 0.3.0 +Requires: python-canonicaljson >= 1.0.0 +Requires: python-importlib_metadata +Requires: python-typing_extensions >= 3.5 +Requires: python-unpaddedbase64 >= 1.0.1 BuildArch: noarch +%if %{with python2} +BuildRequires: python2-typing >= 3.5 +%endif +%ifpython2 +Requires: python-typing >= 3.5 +%endif %python_subpackages %description @@ -42,16 +61,19 @@ Features: * Unprotected data can be added to the object under the "unsigned" key. %prep -%setup -q +%setup -q -n %{modname}-%{version} +%patch0 -p1 %build - %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib}/%{modname} +%check +%python_expand nosetests-%{$python_bin_suffix} + %files %{python_files} %license LICENSE %doc README.rst diff --git a/signedjson-1.1.1.tar.gz b/signedjson-1.1.1.tar.gz new file mode 100644 index 0000000..2444976 --- /dev/null +++ b/signedjson-1.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:350586e7570ba208f7729dcda09d43f554ead0207a15e3e3695533ef3f720009 +size 10906