]> git.pld-linux.org Git - SPECS.git/blob - python-jwt.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / python-jwt.spec
1 # NOTE: for versions >= 1 (for python 3.6+) see python3-jwt.spec
2 #
3 # Conditional build:
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)
7
8 Summary:        JSON Web Token library for Python 2
9 Summary(pl.UTF-8):      Biblioteka JSON Web Token dla Pythona 2
10 Name:           python-jwt
11 # keep 0.3.x here for python2 support
12 Version:        0.3.2
13 Release:        1
14 License:        MIT
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/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-Crypto = 2.6.1
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.3
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-Crypto = 2.6.1
32 %endif
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.714
36 Requires:       python-modules >= 1:2.7
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 This is a JSON Web Token library for Python developed at Gehirn Inc.
42
43 %description -l pl.UTF-8
44 Ten pakiet zawiera bibliotekę JSON Web Token dla Pythona, rozwijaną w
45 Gehirn Inc.
46
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
52
53 %description -n python3-jwt
54 This is a JSON Web Token library for Python developed at Gehirn Inc.
55
56 %description -n python3-jwt -l pl.UTF-8
57 Ten pakiet zawiera bibliotekę JSON Web Token dla Pythona, rozwijaną w
58 Gehirn Inc.
59
60 %prep
61 %setup -q -n jwt-%{version}
62
63 %build
64 %if %{with python2}
65 %py_build
66
67 %if %{with tests}
68 %{__python} -m unittest discover -s jwt/tests
69 %endif
70 %endif
71
72 %if %{with python3}
73 %py3_build
74
75 %if %{with tests}
76 %{__python3} -m unittest discover -s jwt/tests
77 %endif
78 %endif
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82
83 %if %{with python2}
84 %py_install
85
86 %py_postclean
87 %endif
88
89 %if %{with python3}
90 %py3_install
91 %endif
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %if %{with python2}
97 %files
98 %defattr(644,root,root,755)
99 %doc README.rst
100 %{py_sitescriptdir}/jwt
101 %{py_sitescriptdir}/jwt-%{version}-py*.egg-info
102 %endif
103
104 %if %{with python3}
105 %files -n python3-jwt
106 %defattr(644,root,root,755)
107 %doc README.rst
108 %{py3_sitescriptdir}/jwt
109 %{py3_sitescriptdir}/jwt-%{version}-py*.egg-info
110 %endif
This page took 0.100923 seconds and 3 git commands to generate.