14
0

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
This commit is contained in:
Tomáš Chvátal
2020-04-16 12:14:21 +00:00
committed by Git OBS Bridge
parent c95fb9d363
commit 001ad92b11
5 changed files with 67 additions and 8 deletions

View File

@@ -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__)

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:071bac9bfc78bbe67a3ba60f5886c3037875d09342cdfa7c5eb865bb1866368a
size 9652

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Apr 15 13:50:16 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- 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

View File

@@ -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

3
signedjson-1.1.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:350586e7570ba208f7729dcda09d43f554ead0207a15e3e3695533ef3f720009
size 10906