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 %define pypi_name msgpack-python
10 Summary: Binary-based efficient data interchange format
11 Summary(pl.UTF-8): Binarny efektywny format wymiany danych.
12 Name: python-%{module}
16 Group: Development/Languages/Python
17 Source0: https://pypi.debian.net/msgpack/%{module}-%{version}.tar.gz
18 # Source0-md5: 9dfceb24c6e4e7de032687ee5a7ef4d6
19 URL: http://msgpack.org/
20 BuildRequires: libstdc++-devel
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.710
24 BuildRequires: python-devel
25 BuildRequires: python-distribute
28 BuildRequires: python3-devel
29 BuildRequires: python3-distribute
30 BuildRequires: python3-modules
32 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}
46 Summary: Binary-based efficient data interchange format
47 Summary(pl.UTF-8): Binarny efektywny format wymiany danych.
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 %{module}-%{version}
77 %py_build %{?with_tests:test}
81 %py3_build %{?with_tests:test}
87 rm -rf _build/html/_sources
91 rm -rf $RPM_BUILD_ROOT
102 rm -rf $RPM_BUILD_ROOT
106 %defattr(644,root,root,755)
107 %doc COPYING README.rst
108 %dir %{py_sitedir}/%{module}
109 %{py_sitedir}/%{module}/*.py[co]
110 %attr(755,root,root) %{py_sitedir}/%{module}/_packer.so
111 %attr(755,root,root) %{py_sitedir}/%{module}/_unpacker.so
112 %{py_sitedir}/msgpack-%{version}-py*.egg-info
116 %files -n python3-%{module}
117 %defattr(644,root,root,755)
118 %doc COPYING README.rst
119 %dir %{py3_sitedir}/%{module}
120 %attr(755,root,root) %{py3_sitedir}/%{module}/_packer.cpython-*.so
121 %attr(755,root,root) %{py3_sitedir}/%{module}/_unpacker.cpython-*.so
122 %{py3_sitedir}/%{module}/*.py
123 %{py3_sitedir}/%{module}/__pycache__
124 %{py3_sitedir}/msgpack-%{version}-py*.egg-info
129 %defattr(644,root,root,755)
130 %doc docs/_build/html/*