3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Ultra fast JSON encoder and decoder for Python
8 Summary(pl.UTF-8): Ultraszybki koder i dekoder formatu JSON dla Pythona
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/ujson/
15 Source0: https://files.pythonhosted.org/packages/source/u/ujson/ujson-%{version}.tar.gz
16 # Source0-md5: 80d288c186dd02579e1561494b45aa41
17 URL: https://pypi.org/project/ujson/
18 BuildRequires: libstdc++-devel
20 BuildRequires: python-devel >= 1:2.7
21 BuildRequires: python-setuptools
22 BuildRequires: python-setuptools_scm
24 BuildRequires: python-pytest
25 BuildRequires: python-six
29 BuildRequires: python3-devel >= 1:3.5
30 BuildRequires: python3-setuptools
31 BuildRequires: python3-setuptools_scm
33 BuildRequires: python3-pytest
34 BuildRequires: python3-six
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.714
39 Requires: python-modules >= 1:2.7
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 UltraJSON is an ultra fast JSON encoder and decoder written in pure C
44 with bindings for Python 2.7 and 3.5+.
46 %description -l pl.UTF-8
47 UltraJSON to ultraszybki koder i dekoder formatu JSON, napisany w
48 czystym C z wiązaniami do Pythona 2.7 oraz 3.5+.
50 %package -n python3-ujson
51 Summary: Ultra fast JSON encoder and decoder for Python
52 Summary(pl.UTF-8): Ultraszybki koder i dekoder formatu JSON dla Pythona
53 Group: Libraries/Python
54 Requires: python3-modules >= 1:3.5
56 %description -n python3-ujson
57 UltraJSON is an ultra fast JSON encoder and decoder written in pure C
58 with bindings for Python 2.7 and 3.5+.
60 %description -n python3-ujson -l pl.UTF-8
61 UltraJSON to ultraszybki koder i dekoder formatu JSON, napisany w
62 czystym C z wiązaniami do Pythona 2.7 oraz 3.5+.
65 %setup -q -n ujson-%{version}
72 PYTHONPATH=$(readlink -f build-2/lib.*) \
73 %{__python} -m pytest tests
81 PYTHONPATH=$(readlink -f build-3/lib.*) \
82 %{__python3} -m pytest tests
87 rm -rf $RPM_BUILD_ROOT
100 rm -rf $RPM_BUILD_ROOT
104 %defattr(644,root,root,755)
105 %doc LICENSE.txt README.rst
106 %attr(755,root,root) %{py_sitedir}/ujson.so
107 %{py_sitedir}/ujson-%{version}-py*.egg-info
111 %files -n python3-ujson
112 %defattr(644,root,root,755)
113 %doc LICENSE.txt README.rst
114 %attr(755,root,root) %{py3_sitedir}/ujson.cpython-*.so
115 %{py3_sitedir}/ujson-%{version}-py*.egg-info