3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Portable, lightweight MessagePack serializer and deserializer written in pure Python
8 Summary(pl.UTF-8): Przenośna, lekka serializacja i deserializacja MessagePack napisana w czystym Pythonie
13 Group: Libraries/Python
14 #Source0Download: https://pypi.python.org/simple/u-msgpack-python
15 Source0: https://files.pythonhosted.org/packages/source/u/u-msgpack-python/u-msgpack-python-%{version}.tar.gz
16 # Source0-md5: 8691cea6bc7b44bce6e2115260a54323
17 URL: https://github.com/vsergeev/u-msgpack-python
18 %if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
19 BuildRequires: glibc-localedb-all
22 BuildRequires: python-modules >= 1:2.5
23 BuildRequires: python-setuptools
26 BuildRequires: python3-modules >= 1:3.2
27 BuildRequires: python3-setuptools
29 BuildRequires: rpm-pythonprov
30 BuildRequires: rpmbuild(macros) >= 1.714
31 Requires: python-modules >= 1:2.5
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 u-msgpack-python is a lightweight MessagePack <http://msgpack.org/>
37 serializer and deserializer module written in pure Python, compatible
38 with both Python 2 and Python 3, as well as CPython and PyPy
39 implementations of Python. u-msgpack-python is fully compliant with
40 the latest MessagePack specification
41 <https://github.com/msgpack/msgpack/blob/master/spec.md>. In
42 particular, it supports the new binary, UTF-8 string, and
43 application-defined ext types.
45 %description -l pl.UTF-8
46 u-msgpack-python to lekki moduł serializacji i deserializacji
47 MessagePack <http://msgpack.org/> napisany w Pythonie, zgodny z
48 Pythonem zarówno 2 i 3, z implementacjami CPython jak i PyPy.
49 u-msgpack-python jest w pełni zgodny z ostatnią specyfikacją
50 MessagePack <https://github.com/msgpack/msgpack/blob/master/spec.md>.
51 W szczególności obsługuje nowe typu binary, łańcuch UTF-8 oraz ext
52 definiowane przez aplikacje.
54 %package -n python3-u-msgpack
55 Summary: Portable, lightweight MessagePack serializer and deserializer written in pure Python
56 Summary(pl.UTF-8): Przenośna, lekka serializacja i deserializacja MessagePack napisana w czystym Pythonie
57 Group: Libraries/Python
58 Requires: python3-modules >= 1:3.2
60 %description -n python3-u-msgpack
61 u-msgpack-python is a lightweight MessagePack <http://msgpack.org/>
62 serializer and deserializer module written in pure Python, compatible
63 with both Python 2 and Python 3, as well as CPython and PyPy
64 implementations of Python. u-msgpack-python is fully compliant with
65 the latest MessagePack specification
66 <https://github.com/msgpack/msgpack/blob/master/spec.md>. In
67 particular, it supports the new binary, UTF-8 string, and
68 application-defined ext types.
70 %description -n python3-u-msgpack -l pl.UTF-8
71 u-msgpack-python to lekki moduł serializacji i deserializacji
72 MessagePack <http://msgpack.org/> napisany w Pythonie, zgodny z
73 Pythonem zarówno 2 i 3, z implementacjami CPython jak i PyPy.
74 u-msgpack-python jest w pełni zgodny z ostatnią specyfikacją
75 MessagePack <https://github.com/msgpack/msgpack/blob/master/spec.md>.
76 W szczególności obsługuje nowe typu binary, łańcuch UTF-8 oraz ext
77 definiowane przez aplikacje.
80 %setup -q -n u-msgpack-python-%{version}
89 %{__python} test_umsgpack.py
97 %{__python3} test_umsgpack.py
102 rm -rf $RPM_BUILD_ROOT
115 rm -rf $RPM_BUILD_ROOT
119 %defattr(644,root,root,755)
121 %{py_sitescriptdir}/umsgpack.py[co]
122 %{py_sitescriptdir}/u_msgpack_python-%{version}-py*.egg-info
126 %files -n python3-u-msgpack
127 %defattr(644,root,root,755)
129 %{py3_sitescriptdir}/umsgpack.py
130 %{py3_sitescriptdir}/__pycache__/umsgpack.cpython-*.py[co]
131 %{py3_sitescriptdir}/u_msgpack_python-%{version}-py*.egg-info