]> git.pld-linux.org Git - packages/python-msgpack.git/blame - python-msgpack.spec
- python 3.5 rebuild
[packages/python-msgpack.git] / python-msgpack.spec
CommitLineData
df80b467
MK
1#
2# Conditional build:
3## %bcond_with doc # don't build doc
4%bcond_without tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
dfacf687
MK
7
8%define module msgpack
9Summary: Binary-based efficient data interchange format
10Summary(pl.UTF-8): Binarny efektywny format wymiany danych.
11Name: python-%{module}
68a2b5a4 12Version: 0.4.5
39f48a14 13Release: 2
dfacf687
MK
14License: ASL
15Group: Development/Languages/Python
16Source0: http://pypi.python.org/packages/source/m/msgpack-python/msgpack-python-%{version}.tar.gz
68a2b5a4 17# Source0-md5: 3b82bc542d5599896695512e7c32f42d
dfacf687 18URL: http://msgpack.org/
dfacf687
MK
19BuildRequires: rpm-pythonprov
20# if py_postclean is used
21BuildRequires: rpmbuild(macros) >= 1.219
df80b467
MK
22%if %{with python2}
23BuildRequires: python-devel
24BuildRequires: python-distribute
25%endif
26%if %{with python3}
27BuildRequires: python3-devel
28BuildRequires: python3-distribute
29BuildRequires: python3-modules
30%endif
dfacf687 31Requires: python-modules
df80b467 32
dfacf687
MK
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36MessagePack is a binary-based efficient object serialization library.
37It enables to exchange structured objects between many languages like
38JSON. But unlike JSON, it is very fast and small.
39
40%description -l pl.UTF-8
41MessagePack jest binarną, efektywną biblioteką serializacji obiektów.
42Pozwala wymieniać strukturalne obiekty pomiędzy wieloma językami
43podobnie jak JSON. W odróżnieniu jest bardzo szybka i mała.
44
df80b467
MK
45%package -n python3-%{module}
46Summary: -
47Summary(pl.UTF-8): -
48Group: Libraries/Python
49Requires: python3-modules
50
51%description -n python3-%{module}
52MessagePack is a binary-based efficient object serialization library.
53It enables to exchange structured objects between many languages like
54JSON. But unlike JSON, it is very fast and small.
55
56%description -n python3-%{module} -l pl.UTF-8
57MessagePack jest binarną, efektywną biblioteką serializacji obiektów.
58Pozwala wymieniać strukturalne obiekty pomiędzy wieloma językami
59podobnie jak JSON. W odróżnieniu jest bardzo szybka i mała.
60
61%package apidocs
62Summary: %{module} API documentation
63Summary(pl.UTF-8): Dokumentacja API %{module}
64Group: Documentation
65
66%description apidocs
67API documentation for %{module}.
68
69%description apidocs -l pl.UTF-8
70Dokumentacja API %{module}.
71
dfacf687
MK
72%prep
73%setup -q -n msgpack-python-%{version}
74
75%build
df80b467 76%if %{with python2}
dfacf687
MK
77CC="%{__cc}" \
78CFLAGS="%{rpmcflags}" \
df80b467
MK
79%{__python} setup.py build --build-base build-2 %{?with_tests:test}
80%endif
81
82%if %{with python3}
83CC="%{__cc}" \
84CFLAGS="%{rpmcflags}" \
85%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
86%endif
87
88%if %{with doc}
89cd docs
90%{__make} -j1 html
91rm -rf _build/html/_sources
92%endif
dfacf687
MK
93
94%install
95rm -rf $RPM_BUILD_ROOT
df80b467
MK
96
97%if %{with python2}
98%{__python} setup.py \
99 build --build-base build-2 \
100 install --skip-build \
dfacf687
MK
101 --optimize=2 \
102 --root=$RPM_BUILD_ROOT
103
dfacf687 104%py_postclean
df80b467
MK
105%endif
106
107%if %{with python3}
108%{__python3} setup.py \
109 build --build-base build-3 \
110 install --skip-build \
111 --optimize=2 \
112 --root=$RPM_BUILD_ROOT
113%endif
dfacf687
MK
114
115%clean
116rm -rf $RPM_BUILD_ROOT
117
df80b467 118%if %{with python2}
dfacf687
MK
119%files
120%defattr(644,root,root,755)
df80b467 121%doc COPYING README.rst
dfacf687
MK
122%dir %{py_sitedir}/%{module}
123%{py_sitedir}/%{module}/*.py[co]
7f3a6040
MK
124%attr(755,root,root) %{py_sitedir}/%{module}/_packer.so
125%attr(755,root,root) %{py_sitedir}/%{module}/_unpacker.so
dfacf687 126%if "%{py_ver}" > "2.4"
df80b467
MK
127%{py_sitedir}/msgpack_python-%{version}-py*.egg-info
128%endif
129%endif
130
131%if %{with python3}
132%files -n python3-%{module}
133%defattr(644,root,root,755)
134%doc COPYING README.rst
135%dir %{py3_sitedir}/%{module}
136%attr(755,root,root) %{py3_sitedir}/%{module}/_packer.cpython-*.so
137%attr(755,root,root) %{py3_sitedir}/%{module}/_unpacker.cpython-*.so
138%{py3_sitedir}/%{module}/*.py
139%{py3_sitedir}/%{module}/__pycache__
140%{py3_sitedir}/msgpack_python-%{version}-py*.egg-info
141%endif
142
143%if %{with doc}
144%files apidocs
145%defattr(644,root,root,755)
146%doc docs/_build/html/*
dfacf687 147%endif
This page took 0.154562 seconds and 4 git commands to generate.