3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
8 %define pypi_name msgpack-python
9 Summary: Binary-based efficient data interchange format
10 Summary(pl.UTF-8): Binarny, efektywny format wymiany danych
11 Name: python-%{module}
12 # keep 1.0.2 here for python2 support
16 Group: Development/Languages/Python
17 Source0: https://files.pythonhosted.org/packages/source/m/msgpack/%{module}-%{version}.tar.gz
18 # Source0-md5: 68d5804254642905ba87ede509e68970
19 URL: http://msgpack.org/
20 BuildRequires: libstdc++-devel
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.714
24 BuildRequires: python-modules >= 1:2.7
25 BuildRequires: python-setuptools
27 BuildRequires: python-pytest
31 BuildRequires: python3-Cython
32 BuildRequires: python3-devel >= 1:3.5
33 BuildRequires: python3-modules
34 BuildRequires: python3-setuptools
36 BuildRequires: python3-pytest
39 Requires: python-modules >= 1:2.7
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 MessagePack is a binary-based efficient object serialization library.
44 It enables to exchange structured objects between many languages like
45 JSON. But unlike JSON, it is very fast and small.
47 %description -l pl.UTF-8
48 MessagePack to biblioteka do binarnej, efektywnej serializacji
49 obiektów. Pozwala wymieniać strukturalne obiekty pomiędzy wieloma
50 językami, podobnie jak JSON. W odróżnieniu od JSON-a jest bardzo
53 %package -n python3-%{module}
54 Summary: Binary-based efficient data interchange format
55 Summary(pl.UTF-8): Binarny, efektywny format wymiany danych
56 Group: Libraries/Python
57 Requires: python3-modules >= 1:3.5
59 %description -n python3-%{module}
60 MessagePack is a binary-based efficient object serialization library.
61 It enables to exchange structured objects between many languages like
62 JSON. But unlike JSON, it is very fast and small.
64 %description -n python3-%{module} -l pl.UTF-8
65 MessagePack to biblioteka do binarnej, efektywnej serializacji
66 obiektów. Pozwala wymieniać strukturalne obiekty pomiędzy wieloma
67 językami, podobnie jak JSON. W odróżnieniu od JSON-a jest bardzo
71 %setup -q -n %{module}-%{version}
78 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
79 %{__python} -m pytest test
84 /usr/bin/cython3 --cplus msgpack/_cmsgpack.pyx
88 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
89 %{__python3} -m pytest test
94 rm -rf $RPM_BUILD_ROOT
107 rm -rf $RPM_BUILD_ROOT
111 %defattr(644,root,root,755)
112 %doc COPYING README.md
113 %dir %{py_sitescriptdir}/%{module}
114 %{py_sitescriptdir}/%{module}/*.py[co]
115 %{py_sitescriptdir}/msgpack-%{version}-py*.egg-info
119 %files -n python3-%{module}
120 %defattr(644,root,root,755)
121 %doc COPYING README.md
122 %dir %{py3_sitedir}/%{module}
123 %attr(755,root,root) %{py3_sitedir}/%{module}/_cmsgpack.cpython-*.so
124 %{py3_sitedir}/%{module}/*.py
125 %{py3_sitedir}/%{module}/__pycache__
126 %{py3_sitedir}/msgpack-%{version}-py*.egg-info