]> git.pld-linux.org Git - packages/python-msgpack.git/blame_incremental - python-msgpack.spec
- updated to 1.0.2
[packages/python-msgpack.git] / python-msgpack.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module msgpack
8%define pypi_name msgpack-python
9Summary: Binary-based efficient data interchange format
10Summary(pl.UTF-8): Binarny, efektywny format wymiany danych
11Name: python-%{module}
12# keep 1.0.2 here for python2 support
13Version: 1.0.2
14Release: 1
15License: Apache v2.0
16Group: Development/Languages/Python
17Source0: https://files.pythonhosted.org/packages/source/m/msgpack/%{module}-%{version}.tar.gz
18# Source0-md5: 68d5804254642905ba87ede509e68970
19URL: http://msgpack.org/
20BuildRequires: libstdc++-devel
21BuildRequires: rpm-pythonprov
22BuildRequires: rpmbuild(macros) >= 1.714
23%if %{with python2}
24BuildRequires: python-modules >= 1:2.7
25BuildRequires: python-setuptools
26%if %{with tests}
27BuildRequires: python-pytest
28%endif
29%endif
30%if %{with python3}
31BuildRequires: python3-Cython
32BuildRequires: python3-devel >= 1:3.5
33BuildRequires: python3-modules
34BuildRequires: python3-setuptools
35%if %{with tests}
36BuildRequires: python3-pytest
37%endif
38%endif
39Requires: python-modules >= 1:2.7
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43MessagePack is a binary-based efficient object serialization library.
44It enables to exchange structured objects between many languages like
45JSON. But unlike JSON, it is very fast and small.
46
47%description -l pl.UTF-8
48MessagePack to biblioteka do binarnej, efektywnej serializacji
49obiektów. Pozwala wymieniać strukturalne obiekty pomiędzy wieloma
50językami, podobnie jak JSON. W odróżnieniu od JSON-a jest bardzo
51szybka i mała.
52
53%package -n python3-%{module}
54Summary: Binary-based efficient data interchange format
55Summary(pl.UTF-8): Binarny, efektywny format wymiany danych
56Group: Libraries/Python
57Requires: python3-modules >= 1:3.5
58
59%description -n python3-%{module}
60MessagePack is a binary-based efficient object serialization library.
61It enables to exchange structured objects between many languages like
62JSON. But unlike JSON, it is very fast and small.
63
64%description -n python3-%{module} -l pl.UTF-8
65MessagePack to biblioteka do binarnej, efektywnej serializacji
66obiektów. Pozwala wymieniać strukturalne obiekty pomiędzy wieloma
67językami, podobnie jak JSON. W odróżnieniu od JSON-a jest bardzo
68szybka i mała.
69
70%prep
71%setup -q -n %{module}-%{version}
72
73%build
74%if %{with python2}
75%py_build
76
77%if %{with tests}
78PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
79%{__python} -m pytest test
80%endif
81%endif
82
83%if %{with python3}
84/usr/bin/cython3 --cplus msgpack/_cmsgpack.pyx
85%py3_build
86
87%if %{with tests}
88PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
89%{__python3} -m pytest test
90%endif
91%endif
92
93%install
94rm -rf $RPM_BUILD_ROOT
95
96%if %{with python2}
97%py_install
98
99%py_postclean
100%endif
101
102%if %{with python3}
103%py3_install
104%endif
105
106%clean
107rm -rf $RPM_BUILD_ROOT
108
109%if %{with python2}
110%files
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
116%endif
117
118%if %{with python3}
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
127%endif
This page took 0.071004 seconds and 4 git commands to generate.