]> git.pld-linux.org Git - packages/python3-ujson.git/blame - python-ujson.spec
- new
[packages/python3-ujson.git] / python-ujson.spec
CommitLineData
93c06309
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Ultra fast JSON encoder and decoder for Python
8Summary(pl.UTF-8): Ultraszybki koder i dekoder formatu JSON dla Pythona
9Name: python-ujson
10Version: 2.0.3
11Release: 1
12License: BSD
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/ujson/
15Source0: https://files.pythonhosted.org/packages/source/u/ujson/ujson-%{version}.tar.gz
16# Source0-md5: 80d288c186dd02579e1561494b45aa41
17URL: https://pypi.org/project/ujson/
18BuildRequires: libstdc++-devel
19%if %{with python2}
20BuildRequires: python-devel >= 1:2.7
21BuildRequires: python-setuptools
22BuildRequires: python-setuptools_scm
23%if %{with tests}
24BuildRequires: python-pytest
25BuildRequires: python-six
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-devel >= 1:3.5
30BuildRequires: python3-setuptools
31BuildRequires: python3-setuptools_scm
32%if %{with tests}
33BuildRequires: python3-pytest
34BuildRequires: python3-six
35%endif
36%endif
37BuildRequires: rpm-pythonprov
38BuildRequires: rpmbuild(macros) >= 1.714
39Requires: python-modules >= 1:2.7
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43UltraJSON is an ultra fast JSON encoder and decoder written in pure C
44with bindings for Python 2.7 and 3.5+.
45
46%description -l pl.UTF-8
47UltraJSON to ultraszybki koder i dekoder formatu JSON, napisany w
48czystym C z wiązaniami do Pythona 2.7 oraz 3.5+.
49
50%package -n python3-ujson
51Summary: Ultra fast JSON encoder and decoder for Python
52Summary(pl.UTF-8): Ultraszybki koder i dekoder formatu JSON dla Pythona
53Group: Libraries/Python
54Requires: python3-modules >= 1:3.5
55
56%description -n python3-ujson
57UltraJSON is an ultra fast JSON encoder and decoder written in pure C
58with bindings for Python 2.7 and 3.5+.
59
60%description -n python3-ujson -l pl.UTF-8
61UltraJSON to ultraszybki koder i dekoder formatu JSON, napisany w
62czystym C z wiązaniami do Pythona 2.7 oraz 3.5+.
63
64%prep
65%setup -q -n ujson-%{version}
66
67%build
68%if %{with python2}
69%py_build
70
71%if %{with tests}
72PYTHONPATH=$(readlink -f build-2/lib.*) \
73%{__python} -m pytest tests
74%endif
75%endif
76
77%if %{with python3}
78%py3_build
79
80%if %{with tests}
81PYTHONPATH=$(readlink -f build-3/lib.*) \
82%{__python3} -m pytest tests
83%endif
84%endif
85
86%install
87rm -rf $RPM_BUILD_ROOT
88
89%if %{with python2}
90%py_install
91
92%py_postclean
93%endif
94
95%if %{with python3}
96%py3_install
97%endif
98
99%clean
100rm -rf $RPM_BUILD_ROOT
101
102%if %{with python2}
103%files
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
108%endif
109
110%if %{with python3}
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
116%endif
This page took 0.040225 seconds and 4 git commands to generate.