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://files.pythonhosted.org/packages/source/m/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
18 # Source0-md5: dcd854fb41ee7584ebbf35e049e6be98
19 URL: http://msgpack.org/
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.710
23 BuildRequires: python-devel
24 BuildRequires: python-distribute
27 BuildRequires: python3-devel
28 BuildRequires: python3-distribute
29 BuildRequires: python3-modules
31 Requires: python-modules
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 MessagePack is a binary-based efficient object serialization library.
36 It enables to exchange structured objects between many languages like
37 JSON. But unlike JSON, it is very fast and small.
39 %description -l pl.UTF-8
40 MessagePack jest binarną, efektywną biblioteką serializacji obiektów.
41 Pozwala wymieniać strukturalne obiekty pomiędzy wieloma językami
42 podobnie jak JSON. W odróżnieniu jest bardzo szybka i mała.
44 %package -n python3-%{module}
45 Summary: Binary-based efficient data interchange format
46 Summary(pl.UTF-8): Binarny efektywny format wymiany danych.
47 Group: Libraries/Python
48 Requires: python3-modules
50 %description -n python3-%{module}
51 MessagePack is a binary-based efficient object serialization library.
52 It enables to exchange structured objects between many languages like
53 JSON. But unlike JSON, it is very fast and small.
55 %description -n python3-%{module} -l pl.UTF-8
56 MessagePack jest binarną, efektywną biblioteką serializacji obiektów.
57 Pozwala wymieniać strukturalne obiekty pomiędzy wieloma językami
58 podobnie jak JSON. W odróżnieniu jest bardzo szybka i mała.
61 Summary: %{module} API documentation
62 Summary(pl.UTF-8): Dokumentacja API %{module}
66 API documentation for %{module}.
68 %description apidocs -l pl.UTF-8
69 Dokumentacja API %{module}.
72 %setup -q -n msgpack-python-%{version}
76 %py_build %{?with_tests:test}
80 %py3_build %{?with_tests:test}
86 rm -rf _build/html/_sources
90 rm -rf $RPM_BUILD_ROOT
101 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
106 %doc COPYING README.rst
107 %dir %{py_sitedir}/%{module}
108 %{py_sitedir}/%{module}/*.py[co]
109 %attr(755,root,root) %{py_sitedir}/%{module}/_packer.so
110 %attr(755,root,root) %{py_sitedir}/%{module}/_unpacker.so
111 %{py_sitedir}/msgpack_python-%{version}-py*.egg-info
115 %files -n python3-%{module}
116 %defattr(644,root,root,755)
117 %doc COPYING README.rst
118 %dir %{py3_sitedir}/%{module}
119 %attr(755,root,root) %{py3_sitedir}/%{module}/_packer.cpython-*.so
120 %attr(755,root,root) %{py3_sitedir}/%{module}/_unpacker.cpython-*.so
121 %{py3_sitedir}/%{module}/*.py
122 %{py3_sitedir}/%{module}/__pycache__
123 %{py3_sitedir}/msgpack_python-%{version}-py*.egg-info
128 %defattr(644,root,root,755)
129 %doc docs/_build/html/*