]> git.pld-linux.org Git - packages/python-simplejson.git/blob - python-simplejson.spec
Update to 3.4.1
[packages/python-simplejson.git] / python-simplejson.spec
1 # Conditional build:
2 %bcond_without  python2         # Python 2.x module
3 %bcond_without  python3         # Python 3.x module
4 #
5 %define         module          simplejson
6 Summary:        Simple, fast, extensible JSON encoder/decoder for Python
7 Summary(pl.UTF-8):      Prosty, szybki, rozszerzalny (de)koder JSON dla Pythona
8 Name:           python-%{module}
9 Version:        3.4.1
10 Release:        1
11 License:        MIT or AFL v2.1
12 Group:          Libraries
13 Source0:        http://pypi.python.org/packages/source/s/simplejson/%{module}-%{version}.tar.gz
14 # Source0-md5:  5ab77a58759fcdfc14ecbe62a0775847
15 URL:            http://undefined.org/python/#simplejson
16 %if %{with python2}
17 BuildRequires:  python >= 1:2.5
18 BuildRequires:  python-devel
19 BuildRequires:  python-setuptools >= 0.6-0.c1
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3 >= 1:3.0
23 BuildRequires:  python3-devel
24 %endif
25 BuildRequires:  rpm-pythonprov
26 %pyrequires_eq  python-libs
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 simplejson is a simple, fast, complete, correct and extensible JSON
31 <http://json.org/> encoder and decoder for Python 2.5+.
32
33 %description -l pl.UTF-8
34 simplejson to prosty, szybki, pełny, poprawny i rozszerzalny koder i
35 dekoder JSON (<http://json.org/>) dla Pythona 2.5 i nowszych wersji.
36
37 %package -n python3-%{module}
38 Summary:        Simple, fast, extensible JSON encoder/decoder for Python 3
39 Summary(pl.UTF-8):      Prosty, szybki, rozszerzalny (de)koder JSON dla Pythona 3
40 Group:          Libraries
41
42 %description -n python3-%{module}
43 simplejson is a simple, fast, complete, correct and extensible JSON
44 <http://json.org/> encoder and decoder for Python 3.
45
46 %description -n python3-%{module} -l pl.UTF-8
47 simplejson to prosty, szybki, pełny, poprawny i rozszerzalny koder i
48 dekoder JSON (<http://json.org/>) dla Pythona 3.
49
50 %prep
51 %setup -qn %{module}-%{version}
52
53 %build
54 %if %{with python2}
55 CC="%{__cc}" \
56 CFLAGS="%{rpmcflags}" \
57 %{__python} setup.py build --build-base py2
58 %endif
59
60 %if %{with python3}
61 CC="%{__cc}" \
62 CFLAGS="%{rpmcflags}" \
63 %{__python3} setup.py build --build-base py3
64 %endif
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 %if %{with python2}
70 %{__python} setup.py \
71         build --build-base py2 \
72         install \
73         --optimize=2 \
74         --root=$RPM_BUILD_ROOT
75
76 rm -rf $RPM_BUILD_ROOT%{py_sitedir}/simplejson/tests
77 %py_postclean
78 %endif
79
80 %if %{with python3}
81 %{__python3} setup.py \
82         build --build-base py3 \
83         install \
84         --optimize=2 \
85         --root=$RPM_BUILD_ROOT
86
87 rm -rf $RPM_BUILD_ROOT%{py3_sitedir}/simplejson/tests
88 %endif
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python2}
94 %files
95 %defattr(644,root,root,755)
96 %doc CHANGES.txt LICENSE.txt README.rst
97 %dir %{py_sitedir}/simplejson
98 %{py_sitedir}/simplejson/*.py[co]
99 %attr(755,root,root) %{py_sitedir}/simplejson/*.so
100 %{py_sitedir}/simplejson-%{version}-py*.egg-info
101 %endif
102
103 %if %{with python3}
104 %files -n python3-%{module}
105 %defattr(644,root,root,755)
106 %dir %{py3_sitedir}/simplejson
107 %{py3_sitedir}/simplejson/__pycache__
108 %{py3_sitedir}/simplejson/*.py
109 %attr(755,root,root) %{py3_sitedir}/simplejson/*.so
110 %{py3_sitedir}/simplejson-%{version}-py*.egg-info
111 %endif
This page took 0.07632 seconds and 3 git commands to generate.