]> git.pld-linux.org Git - packages/python3-ujson.git/blob - python-ujson.spec
370840d91bccf2f8a9fe65e3928bc4457c9fc8c1
[packages/python3-ujson.git] / python-ujson.spec
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
7 Summary:        Ultra fast JSON encoder and decoder for Python
8 Summary(pl.UTF-8):      Ultraszybki koder i dekoder formatu JSON dla Pythona
9 Name:           python-ujson
10 Version:        2.0.3
11 Release:        1
12 License:        BSD
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
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.7
21 BuildRequires:  python-setuptools
22 BuildRequires:  python-setuptools_scm
23 %if %{with tests}
24 BuildRequires:  python-pytest
25 BuildRequires:  python-six
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-devel >= 1:3.5
30 BuildRequires:  python3-setuptools
31 BuildRequires:  python3-setuptools_scm
32 %if %{with tests}
33 BuildRequires:  python3-pytest
34 BuildRequires:  python3-six
35 %endif
36 %endif
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)
41
42 %description
43 UltraJSON is an ultra fast JSON encoder and decoder written in pure C
44 with bindings for Python 2.7 and 3.5+.
45
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+.
49
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
55
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+.
59
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+.
63
64 %prep
65 %setup -q -n ujson-%{version}
66
67 %build
68 %if %{with python2}
69 %py_build
70
71 %if %{with tests}
72 PYTHONPATH=$(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}
81 PYTHONPATH=$(readlink -f build-3/lib.*) \
82 %{__python3} -m pytest tests
83 %endif
84 %endif
85
86 %install
87 rm -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
100 rm -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.067903 seconds and 2 git commands to generate.