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