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
9 Summary: Binary-based efficient data interchange format
10 Summary(pl.UTF-8): Binarny efektywny format wymiany danych.
11 Name: python-%{module}
15 Group: Development/Languages/Python
16 Source0: http://pypi.python.org/packages/source/m/msgpack-python/msgpack-python-%{version}.tar.gz
17 # Source0-md5: 3b82bc542d5599896695512e7c32f42d
18 URL: http://msgpack.org/
19 BuildRequires: rpm-pythonprov
20 # if py_postclean is used
21 BuildRequires: rpmbuild(macros) >= 1.219
23 BuildRequires: python-devel
24 BuildRequires: python-distribute
27 BuildRequires: python3-devel
28 BuildRequires: python3-distribute
29 BuildRequires: python3-modules
31 Requires: python-modules
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 MessagePack is a binary-based efficient object serialization library.
37 It enables to exchange structured objects between many languages like
38 JSON. But unlike JSON, it is very fast and small.
40 %description -l pl.UTF-8
41 MessagePack jest binarną, efektywną biblioteką serializacji obiektów.
42 Pozwala wymieniać strukturalne obiekty pomiędzy wieloma językami
43 podobnie jak JSON. W odróżnieniu jest bardzo szybka i mała.
45 %package -n python3-%{module}
48 Group: Libraries/Python
49 Requires: python3-modules
51 %description -n python3-%{module}
52 MessagePack is a binary-based efficient object serialization library.
53 It enables to exchange structured objects between many languages like
54 JSON. But unlike JSON, it is very fast and small.
56 %description -n python3-%{module} -l pl.UTF-8
57 MessagePack jest binarną, efektywną biblioteką serializacji obiektów.
58 Pozwala wymieniać strukturalne obiekty pomiędzy wieloma językami
59 podobnie jak JSON. W odróżnieniu jest bardzo szybka i mała.
62 Summary: %{module} API documentation
63 Summary(pl.UTF-8): Dokumentacja API %{module}
67 API documentation for %{module}.
69 %description apidocs -l pl.UTF-8
70 Dokumentacja API %{module}.
73 %setup -q -n msgpack-python-%{version}
78 CFLAGS="%{rpmcflags}" \
79 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
84 CFLAGS="%{rpmcflags}" \
85 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
91 rm -rf _build/html/_sources
95 rm -rf $RPM_BUILD_ROOT
98 %{__python} setup.py \
99 build --build-base build-2 \
100 install --skip-build \
102 --root=$RPM_BUILD_ROOT
108 %{__python3} setup.py \
109 build --build-base build-3 \
110 install --skip-build \
112 --root=$RPM_BUILD_ROOT
116 rm -rf $RPM_BUILD_ROOT
120 %defattr(644,root,root,755)
121 %doc COPYING README.rst
122 %dir %{py_sitedir}/%{module}
123 %{py_sitedir}/%{module}/*.py[co]
124 %attr(755,root,root) %{py_sitedir}/%{module}/_packer.so
125 %attr(755,root,root) %{py_sitedir}/%{module}/_unpacker.so
126 %if "%{py_ver}" > "2.4"
127 %{py_sitedir}/msgpack_python-%{version}-py*.egg-info
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
145 %defattr(644,root,root,755)
146 %doc docs/_build/html/*