]>
Commit | Line | Data |
---|---|---|
5be726de | 1 | # |
fd1cb295 MB |
2 | # Conditional build: |
3 | %bcond_without python2 # Python 2.x module | |
4 | %bcond_without python3 # Python 3.x module | |
5 | # | |
0e00b2f1 | 6 | %define module simplejson |
fe64986d | 7 | Summary: Simple, fast, extensible JSON encoder/decoder for Python |
493694f9 | 8 | Summary(pl.UTF-8): Prosty, szybki, rozszerzalny (de)koder JSON dla Pythona |
fe64986d | 9 | Name: python-%{module} |
e1a6da1b | 10 | Version: 3.17.2 |
15967915 | 11 | Release: 5 |
0569c674 | 12 | License: MIT or AFL v2.1 |
fe64986d | 13 | Group: Libraries |
e1a6da1b | 14 | #Source0Download: https://pypi.org/pypi/simplejson |
19d8e45b | 15 | Source0: https://files.pythonhosted.org/packages/source/s/simplejson/%{module}-%{version}.tar.gz |
e1a6da1b JB |
16 | # Source0-md5: 27fba3bc75a32318bd3b163b8a31aa7e |
17 | URL: https://simplejson.readthedocs.io/ | |
18 | BuildRequires: rpmbuild(macros) >= 1.714 | |
fd1cb295 | 19 | %if %{with python2} |
0569c674 | 20 | BuildRequires: python >= 1:2.5 |
5be726de | 21 | BuildRequires: python-devel >= 1:2.5 |
19d8e45b | 22 | BuildRequires: python-setuptools >= 1:7 |
fd1cb295 MB |
23 | %endif |
24 | %if %{with python3} | |
5be726de JB |
25 | BuildRequires: python3 >= 1:3.3 |
26 | BuildRequires: python3-devel >= 1:3.3 | |
19d8e45b | 27 | BuildRequires: python3-setuptools >= 1:7 |
fd1cb295 | 28 | %endif |
0e00b2f1 | 29 | BuildRequires: rpm-pythonprov |
19d8e45b | 30 | Requires: python-libs >= 1:2.5 |
fe64986d | 31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
34 | simplejson is a simple, fast, complete, correct and extensible JSON | |
0569c674 | 35 | <http://json.org/> encoder and decoder for Python 2.5+. |
0e00b2f1 | 36 | |
2afa74c9 JR |
37 | %description -l pl.UTF-8 |
38 | simplejson to prosty, szybki, pełny, poprawny i rozszerzalny koder i | |
0569c674 | 39 | dekoder JSON (<http://json.org/>) dla Pythona 2.5 i nowszych wersji. |
fe64986d | 40 | |
fd1cb295 MB |
41 | %package -n python3-%{module} |
42 | Summary: Simple, fast, extensible JSON encoder/decoder for Python 3 | |
43 | Summary(pl.UTF-8): Prosty, szybki, rozszerzalny (de)koder JSON dla Pythona 3 | |
44 | Group: Libraries | |
19d8e45b | 45 | Requires: python3-libs >= 1:3.3 |
fd1cb295 MB |
46 | |
47 | %description -n python3-%{module} | |
48 | simplejson is a simple, fast, complete, correct and extensible JSON | |
49 | <http://json.org/> encoder and decoder for Python 3. | |
50 | ||
51 | %description -n python3-%{module} -l pl.UTF-8 | |
52 | simplejson to prosty, szybki, pełny, poprawny i rozszerzalny koder i | |
53 | dekoder JSON (<http://json.org/>) dla Pythona 3. | |
54 | ||
fe64986d | 55 | %prep |
56 | %setup -qn %{module}-%{version} | |
57 | ||
58 | %build | |
fd1cb295 | 59 | %if %{with python2} |
c75f8064 | 60 | %py_build |
fd1cb295 MB |
61 | %endif |
62 | ||
63 | %if %{with python3} | |
c75f8064 | 64 | %py3_build |
fd1cb295 | 65 | %endif |
32daac38 | 66 | |
fe64986d | 67 | %install |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
fd1cb295 | 70 | %if %{with python2} |
c75f8064 | 71 | %py_install |
0e00b2f1 | 72 | |
c75f8064 | 73 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/simplejson/tests |
fd1cb295 MB |
74 | %py_postclean |
75 | %endif | |
76 | ||
77 | %if %{with python3} | |
c75f8064 | 78 | %py3_install |
fd1cb295 | 79 | |
c75f8064 | 80 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/simplejson/tests |
fd1cb295 | 81 | %endif |
0e00b2f1 | 82 | |
fe64986d | 83 | %clean |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
fd1cb295 | 86 | %if %{with python2} |
fe64986d | 87 | %files |
88 | %defattr(644,root,root,755) | |
0569c674 | 89 | %doc CHANGES.txt LICENSE.txt README.rst |
27f03be6 | 90 | %dir %{py_sitedir}/simplejson |
91 | %{py_sitedir}/simplejson/*.py[co] | |
1e95f9d1 | 92 | %attr(755,root,root) %{py_sitedir}/simplejson/_speedups.so |
27f03be6 | 93 | %{py_sitedir}/simplejson-%{version}-py*.egg-info |
fd1cb295 MB |
94 | %endif |
95 | ||
96 | %if %{with python3} | |
97 | %files -n python3-%{module} | |
98 | %defattr(644,root,root,755) | |
e1a6da1b | 99 | %doc CHANGES.txt LICENSE.txt README.rst |
fd1cb295 MB |
100 | %dir %{py3_sitedir}/simplejson |
101 | %{py3_sitedir}/simplejson/__pycache__ | |
102 | %{py3_sitedir}/simplejson/*.py | |
1e95f9d1 | 103 | %attr(755,root,root) %{py3_sitedir}/simplejson/_speedups.cpython-*.so |
fd1cb295 MB |
104 | %{py3_sitedir}/simplejson-%{version}-py*.egg-info |
105 | %endif |