]> git.pld-linux.org Git - packages/python-simplejson.git/blob - python-simplejson.spec
2a5f9ee3badf8b5ebefb693576da7f798dff0900
[packages/python-simplejson.git] / python-simplejson.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # Python 2.x module
4 %bcond_without  python3         # Python 3.x module
5 #
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
9 Name:           python-%{module}
10 Version:        3.6.5
11 Release:        2
12 License:        MIT or AFL v2.1
13 Group:          Libraries
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
17 %if %{with python2}
18 BuildRequires:  python >= 1:2.5
19 BuildRequires:  python-devel >= 1:2.5
20 BuildRequires:  python-setuptools >= 0.6-0.c1
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3 >= 1:3.3
24 BuildRequires:  python3-devel >= 1:3.3
25 %endif
26 BuildRequires:  rpm-pythonprov
27 %pyrequires_eq  python-libs
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 simplejson is a simple, fast, complete, correct and extensible JSON
32 <http://json.org/> encoder and decoder for Python 2.5+.
33
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.
37
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
41 Group:          Libraries
42
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.
46
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.
50
51 %prep
52 %setup -qn %{module}-%{version}
53
54 %build
55 %if %{with python2}
56 CC="%{__cc}" \
57 CFLAGS="%{rpmcflags}" \
58 %{__python} setup.py build --build-base py2
59 %endif
60
61 %if %{with python3}
62 CC="%{__cc}" \
63 CFLAGS="%{rpmcflags}" \
64 %{__python3} setup.py build --build-base py3
65 %endif
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69
70 %if %{with python2}
71 %{__python} setup.py \
72         build --build-base py2 \
73         install \
74         --optimize=2 \
75         --root=$RPM_BUILD_ROOT
76
77 rm -rf $RPM_BUILD_ROOT%{py_sitedir}/simplejson/tests
78 %py_postclean
79 %endif
80
81 %if %{with python3}
82 %{__python3} setup.py \
83         build --build-base py3 \
84         install \
85         --optimize=2 \
86         --root=$RPM_BUILD_ROOT
87
88 rm -rf $RPM_BUILD_ROOT%{py3_sitedir}/simplejson/tests
89 %endif
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %if %{with python2}
95 %files
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
102 %endif
103
104 %if %{with python3}
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
112 %endif
This page took 0.040185 seconds and 2 git commands to generate.