]>
Commit | Line | Data |
---|---|---|
f0634576 MB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # Python 2.x module | |
4 | %bcond_without python3 # Python 3.x module | |
5 | # | |
2e5edbe6 | 6 | %define module josepy |
f0634576 MB |
7 | Summary: JOSE protocol implementation |
8 | Name: python-%{module} | |
2e5edbe6 JR |
9 | Version: 1.13.0 |
10 | Release: 1 | |
f0634576 MB |
11 | License: Apache v2.0 |
12 | Group: Development/Languages/Python | |
63bd384e | 13 | Source0: https://files.pythonhosted.org/packages/source/j/josepy/josepy-%{version}.tar.gz |
2e5edbe6 | 14 | # Source0-md5: d0f8dc9ffbf3ce0bd9c40e5ec1bf3516 |
f0634576 MB |
15 | URL: https://josepy.readthedocs.io/en/latest/ |
16 | %if %{with python2} | |
17 | BuildRequires: python-devel >= 1:2.6 | |
18 | BuildRequires: python-setuptools | |
19 | %endif | |
20 | %if %{with python3} | |
21 | BuildRequires: python3-devel >= 1:3.2 | |
22 | BuildRequires: python3-setuptools | |
23 | %endif | |
9880b586 | 24 | BuildArch: noarch |
f0634576 MB |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
28 | This package provides JOSE protocol implementation. | |
29 | ||
30 | %package -n python3-%{module} | |
31 | Summary: JOSE protocol implementation in Python 3 | |
32 | Group: Development/Languages/Python | |
33 | ||
34 | %description -n python3-%{module} | |
35 | This package provides JOSE protocol implementation in Python 3. | |
36 | ||
37 | %prep | |
38 | %setup -q -n %{module}-%{version} | |
39 | ||
40 | %build | |
41 | %if %{with python2} | |
42 | %py_build | |
43 | %endif | |
44 | %if %{with python3} | |
45 | %py3_build | |
46 | %endif | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %if %{with python3} | |
52 | %py3_install | |
53 | %endif | |
54 | ||
55 | %if %{with python2} | |
56 | %py_install | |
57 | %endif | |
58 | ||
59 | %clean | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %if %{with python2} | |
63 | %files | |
64 | %defattr(644,root,root,755) | |
65 | %attr(755,root,root) %{_bindir}/jws | |
66 | %{py_sitescriptdir}/josepy-*-py*.egg-info | |
67 | %{py_sitescriptdir}/josepy | |
68 | %endif | |
69 | ||
70 | %if %{with python3} | |
71 | %files -n python3-%{module} | |
72 | %defattr(644,root,root,755) | |
73 | %{py3_sitescriptdir}/josepy-*-py*.egg-info | |
74 | %{py3_sitescriptdir}/josepy | |
75 | %endif |