1 # NOTE: for versions >= 1 (for python 3.6+) see python3-jwt.spec
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_with python3 # CPython 3.x module (built from python3-jwt.spec)
8 Summary: JSON Web Token library for Python 2
9 Summary(pl.UTF-8): Biblioteka JSON Web Token dla Pythona 2
11 # keep 0.3.x here for python2 support
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/jwt/
17 Source0: https://files.pythonhosted.org/packages/source/j/jwt/jwt-%{version}.tar.gz
18 # Source0-md5: 97deed6b354bc8f5163f6a5cbe6c849e
19 URL: https://pypi.org/project/jwt/
21 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-Crypto = 2.6.1
28 BuildRequires: python3-modules >= 1:3.3
29 BuildRequires: python3-setuptools
31 BuildRequires: python3-Crypto = 2.6.1
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.714
36 Requires: python-modules >= 1:2.7
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 This is a JSON Web Token library for Python developed at Gehirn Inc.
43 %description -l pl.UTF-8
44 Ten pakiet zawiera bibliotekę JSON Web Token dla Pythona, rozwijaną w
47 %package -n python3-jwt
48 Summary: JSON Web Token library for Python 3
49 Summary(pl.UTF-8): Biblioteka JSON Web Token dla Pythona 3
50 Group: Libraries/Python
51 Requires: python3-modules >= 1:3.4
53 %description -n python3-jwt
54 This is a JSON Web Token library for Python developed at Gehirn Inc.
56 %description -n python3-jwt -l pl.UTF-8
57 Ten pakiet zawiera bibliotekę JSON Web Token dla Pythona, rozwijaną w
61 %setup -q -n jwt-%{version}
68 %{__python} -m unittest discover -s jwt/tests
76 %{__python3} -m unittest discover -s jwt/tests
81 rm -rf $RPM_BUILD_ROOT
94 rm -rf $RPM_BUILD_ROOT
98 %defattr(644,root,root,755)
100 %{py_sitescriptdir}/jwt
101 %{py_sitescriptdir}/jwt-%{version}-py*.egg-info
105 %files -n python3-jwt
106 %defattr(644,root,root,755)
108 %{py3_sitescriptdir}/jwt
109 %{py3_sitescriptdir}/jwt-%{version}-py*.egg-info