3 %bcond_without python2 # Python 2.x module
4 %bcond_without python3 # Python 3.x module
6 %define module simplejson
7 Summary: Simple, fast, extensible JSON encoder/decoder for Python
8 Summary(pl.UTF-8): Prosty, szybki, rozszerzalny (de)koder JSON dla Pythona
12 License: MIT or AFL v2.1
14 #Source0Download: https://pypi.python.org/pypi/simplejson
15 Source0: https://files.pythonhosted.org/packages/source/s/simplejson/%{module}-%{version}.tar.gz
16 # Source0-md5: 426a9631d22851a7a970b1a677368b15
17 URL: http://simplejson.readthedocs.org/
18 BuildRequires: rpmbuild(macros) >= 1.710
20 BuildRequires: python >= 1:2.5
21 BuildRequires: python-devel >= 1:2.5
22 BuildRequires: python-setuptools >= 1:7
25 BuildRequires: python3 >= 1:3.3
26 BuildRequires: python3-devel >= 1:3.3
27 BuildRequires: python3-setuptools >= 1:7
29 BuildRequires: rpm-pythonprov
30 Requires: python-libs >= 1:2.5
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 simplejson is a simple, fast, complete, correct and extensible JSON
35 <http://json.org/> encoder and decoder for Python 2.5+.
37 %description -l pl.UTF-8
38 simplejson to prosty, szybki, pełny, poprawny i rozszerzalny koder i
39 dekoder JSON (<http://json.org/>) dla Pythona 2.5 i nowszych wersji.
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
45 Requires: python3-libs >= 1:3.3
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.
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.
56 %setup -qn %{module}-%{version}
68 rm -rf $RPM_BUILD_ROOT
73 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/simplejson/tests
80 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/simplejson/tests
84 rm -rf $RPM_BUILD_ROOT
88 %defattr(644,root,root,755)
89 %doc CHANGES.txt LICENSE.txt README.rst
90 %dir %{py_sitedir}/simplejson
91 %{py_sitedir}/simplejson/*.py[co]
92 %attr(755,root,root) %{py_sitedir}/simplejson/_speedups.so
93 %{py_sitedir}/simplejson-%{version}-py*.egg-info
97 %files -n python3-%{module}
98 %defattr(644,root,root,755)
99 %dir %{py3_sitedir}/simplejson
100 %{py3_sitedir}/simplejson/__pycache__
101 %{py3_sitedir}/simplejson/*.py
102 %attr(755,root,root) %{py3_sitedir}/simplejson/_speedups.cpython-*.so
103 %{py3_sitedir}/simplejson-%{version}-py*.egg-info