commit ea1e1ff6463b159cb5bd2d05697bfadf335ee0f6
Author: Jakub Bogusz <[email protected]>
Date:   Tue Jan 19 22:34:22 2021 +0100

    - updated to 1.1.0 as python3-jwt.spec for python 3.6+
    - added requirements patch (allow cryptography 3.3.x)

 python-jwt.spec                | 108 -----------------------------------------
 python3-jwt-requirements.patch |  11 +++++
 python3-jwt.spec               |  58 ++++++++++++++++++++++
 3 files changed, 69 insertions(+), 108 deletions(-)
---
diff --git a/python-jwt.spec b/python-jwt.spec
deleted file mode 100644
index 3dabc7e..0000000
--- a/python-jwt.spec
+++ /dev/null
@@ -1,108 +0,0 @@
-#
-# Conditional build:
-%bcond_without tests   # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-
-Summary:       JSON Web Token library for Python 2
-Summary(pl.UTF-8):     Biblioteka JSON Web Token dla Pythona 2
-Name:          python-jwt
-Version:       0.3.2
-Release:       1
-License:       MIT
-Group:         Libraries/Python
-#Source0Download: https://pypi.org/simple/jwt/
-Source0:       
https://files.pythonhosted.org/packages/source/j/jwt/jwt-%{version}.tar.gz
-# Source0-md5: 97deed6b354bc8f5163f6a5cbe6c849e
-URL:           https://pypi.org/project/jwt/
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-Crypto = 2.6.1
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.3
-BuildRequires: python3-setuptools
-%if %{with tests}
-BuildRequires: python3-Crypto = 2.6.1
-%endif
-%endif
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-Requires:      python-modules >= 1:2.7
-BuildArch:     noarch
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-This is a JSON Web Token library for Python developed at Gehirn Inc.
-
-%description -l pl.UTF-8
-Ten pakiet zawiera bibliotekę JSON Web Token dla Pythona, rozwijaną w
-Gehirn Inc.
-
-%package -n python3-jwt
-Summary:       JSON Web Token library for Python 3
-Summary(pl.UTF-8):     Biblioteka JSON Web Token dla Pythona 3
-Group:         Libraries/Python
-Requires:      python3-modules >= 1:3.4
-
-%description -n python3-jwt
-This is a JSON Web Token library for Python developed at Gehirn Inc.
-
-%description -n python3-jwt -l pl.UTF-8
-Ten pakiet zawiera bibliotekę JSON Web Token dla Pythona, rozwijaną w
-Gehirn Inc.
-
-%prep
-%setup -q -n jwt-%{version}
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-%{__python} -m unittest discover -s jwt/tests
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-%{__python3} -m unittest discover -s jwt/tests
-%endif
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc README.rst
-%{py_sitescriptdir}/jwt
-%{py_sitescriptdir}/jwt-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-jwt
-%defattr(644,root,root,755)
-%doc README.rst
-%{py3_sitescriptdir}/jwt
-%{py3_sitescriptdir}/jwt-%{version}-py*.egg-info
-%endif
diff --git a/python3-jwt.spec b/python3-jwt.spec
new file mode 100644
index 0000000..05ff9eb
--- /dev/null
+++ b/python3-jwt.spec
@@ -0,0 +1,58 @@
+#
+# Conditional build:
+%bcond_with    tests   # unit tests (not included in dist)
+
+Summary:       JSON Web Token library for Python 3
+Summary(pl.UTF-8):     Biblioteka JSON Web Token dla Pythona 3
+Name:          python3-jwt
+Version:       1.1.0
+Release:       1
+License:       MIT
+Group:         Libraries/Python
+#Source0Download: https://pypi.org/simple/jwt/
+Source0:       
https://files.pythonhosted.org/packages/source/j/jwt/jwt-%{version}.tar.gz
+# Source0-md5: d430b0a659660e43e0bd4ec92ad323d9
+Patch0:                %{name}-requirements.patch
+URL:           https://pypi.org/project/jwt/
+BuildRequires: python3-modules >= 1:3.6
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-cryptography >= 2.9.3
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires:      python3-modules >= 1:3.6
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This is a JSON Web Token library for Python developed at Gehirn Inc.
+
+%description -l pl.UTF-8
+Ten pakiet zawiera bibliotekę JSON Web Token dla Pythona, rozwijaną w
+Gehirn Inc.
+
+%prep
+%setup -q -n jwt-%{version}
+%patch0 -p1
+
+%build
+%py3_build
+
+%if %{with tests}
+%{__python3} -m unittest discover -s jwt/tests
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%{py3_sitescriptdir}/jwt
+%{py3_sitescriptdir}/jwt-%{version}-py*.egg-info
diff --git a/python3-jwt-requirements.patch b/python3-jwt-requirements.patch
new file mode 100644
index 0000000..999f9f8
--- /dev/null
+++ b/python3-jwt-requirements.patch
@@ -0,0 +1,11 @@
+--- jwt-1.1.0/setup.py.orig    2020-10-30 07:10:02.000000000 +0100
++++ jwt-1.1.0/setup.py 2021-01-19 21:59:49.627014086 +0100
+@@ -24,7 +24,7 @@
+ 
+ here = os.path.dirname(__file__)
+ requires = [
+-    'cryptography > 2.9.2, <= 3.2.1',
++    'cryptography > 2.9.2',
+ ]
+ 
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-jwt.git/commitdiff/ea1e1ff6463b159cb5bd2d05697bfadf335ee0f6

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to