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