2 %bcond_without python2 # Python 2.x module
3 %bcond_without python3 # Python 3.x module
5 %define module simplejson
6 Summary: Simple, fast, extensible JSON encoder/decoder for Python
7 Summary(pl.UTF-8): Prosty, szybki, rozszerzalny (de)koder JSON dla Pythona
11 License: MIT or AFL v2.1
13 Source0: http://pypi.python.org/packages/source/s/simplejson/%{module}-%{version}.tar.gz
14 # Source0-md5: 5ab77a58759fcdfc14ecbe62a0775847
15 URL: http://undefined.org/python/#simplejson
17 BuildRequires: python >= 1:2.5
18 BuildRequires: python-devel
19 BuildRequires: python-setuptools >= 0.6-0.c1
22 BuildRequires: python3 >= 1:3.0
23 BuildRequires: python3-devel
25 BuildRequires: rpm-pythonprov
26 %pyrequires_eq python-libs
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 simplejson is a simple, fast, complete, correct and extensible JSON
31 <http://json.org/> encoder and decoder for Python 2.5+.
33 %description -l pl.UTF-8
34 simplejson to prosty, szybki, pełny, poprawny i rozszerzalny koder i
35 dekoder JSON (<http://json.org/>) dla Pythona 2.5 i nowszych wersji.
37 %package -n python3-%{module}
38 Summary: Simple, fast, extensible JSON encoder/decoder for Python 3
39 Summary(pl.UTF-8): Prosty, szybki, rozszerzalny (de)koder JSON dla Pythona 3
42 %description -n python3-%{module}
43 simplejson is a simple, fast, complete, correct and extensible JSON
44 <http://json.org/> encoder and decoder for Python 3.
46 %description -n python3-%{module} -l pl.UTF-8
47 simplejson to prosty, szybki, pełny, poprawny i rozszerzalny koder i
48 dekoder JSON (<http://json.org/>) dla Pythona 3.
51 %setup -qn %{module}-%{version}
56 CFLAGS="%{rpmcflags}" \
57 %{__python} setup.py build --build-base py2
62 CFLAGS="%{rpmcflags}" \
63 %{__python3} setup.py build --build-base py3
67 rm -rf $RPM_BUILD_ROOT
70 %{__python} setup.py \
71 build --build-base py2 \
74 --root=$RPM_BUILD_ROOT
76 rm -rf $RPM_BUILD_ROOT%{py_sitedir}/simplejson/tests
81 %{__python3} setup.py \
82 build --build-base py3 \
85 --root=$RPM_BUILD_ROOT
87 rm -rf $RPM_BUILD_ROOT%{py3_sitedir}/simplejson/tests
91 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %doc CHANGES.txt LICENSE.txt README.rst
97 %dir %{py_sitedir}/simplejson
98 %{py_sitedir}/simplejson/*.py[co]
99 %attr(755,root,root) %{py_sitedir}/simplejson/*.so
100 %{py_sitedir}/simplejson-%{version}-py*.egg-info
104 %files -n python3-%{module}
105 %defattr(644,root,root,755)
106 %dir %{py3_sitedir}/simplejson
107 %{py3_sitedir}/simplejson/__pycache__
108 %{py3_sitedir}/simplejson/*.py
109 %attr(755,root,root) %{py3_sitedir}/simplejson/*.so
110 %{py3_sitedir}/simplejson-%{version}-py*.egg-info