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