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 Source0: https://pypi.python.org/packages/source/s/simplejson/%{module}-%{version}.tar.gz
15 # Source0-md5: b65dc21c7aaad14c6b4ad0d9179e437d
16 URL: http://undefined.org/python/#simplejson
18 BuildRequires: python >= 1:2.5
19 BuildRequires: python-devel >= 1:2.5
20 BuildRequires: python-setuptools >= 0.6-0.c1
23 BuildRequires: python3 >= 1:3.3
24 BuildRequires: python3-devel >= 1:3.3
26 BuildRequires: rpm-pythonprov
27 %pyrequires_eq python-libs
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 simplejson is a simple, fast, complete, correct and extensible JSON
32 <http://json.org/> encoder and decoder for Python 2.5+.
34 %description -l pl.UTF-8
35 simplejson to prosty, szybki, pełny, poprawny i rozszerzalny koder i
36 dekoder JSON (<http://json.org/>) dla Pythona 2.5 i nowszych wersji.
38 %package -n python3-%{module}
39 Summary: Simple, fast, extensible JSON encoder/decoder for Python 3
40 Summary(pl.UTF-8): Prosty, szybki, rozszerzalny (de)koder JSON dla Pythona 3
43 %description -n python3-%{module}
44 simplejson is a simple, fast, complete, correct and extensible JSON
45 <http://json.org/> encoder and decoder for Python 3.
47 %description -n python3-%{module} -l pl.UTF-8
48 simplejson to prosty, szybki, pełny, poprawny i rozszerzalny koder i
49 dekoder JSON (<http://json.org/>) dla Pythona 3.
52 %setup -qn %{module}-%{version}
57 CFLAGS="%{rpmcflags}" \
58 %{__python} setup.py build --build-base py2
63 CFLAGS="%{rpmcflags}" \
64 %{__python3} setup.py build --build-base py3
68 rm -rf $RPM_BUILD_ROOT
71 %{__python} setup.py \
72 build --build-base py2 \
75 --root=$RPM_BUILD_ROOT
77 rm -rf $RPM_BUILD_ROOT%{py_sitedir}/simplejson/tests
82 %{__python3} setup.py \
83 build --build-base py3 \
86 --root=$RPM_BUILD_ROOT
88 rm -rf $RPM_BUILD_ROOT%{py3_sitedir}/simplejson/tests
92 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
97 %doc CHANGES.txt LICENSE.txt README.rst
98 %dir %{py_sitedir}/simplejson
99 %{py_sitedir}/simplejson/*.py[co]
100 %attr(755,root,root) %{py_sitedir}/simplejson/*.so
101 %{py_sitedir}/simplejson-%{version}-py*.egg-info
105 %files -n python3-%{module}
106 %defattr(644,root,root,755)
107 %dir %{py3_sitedir}/simplejson
108 %{py3_sitedir}/simplejson/__pycache__
109 %{py3_sitedir}/simplejson/*.py
110 %attr(755,root,root) %{py3_sitedir}/simplejson/*.so
111 %{py3_sitedir}/simplejson-%{version}-py*.egg-info