]> git.pld-linux.org Git - packages/python-msgpack.git/blame - python-msgpack.spec
- release 2 (by relup.sh)
[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
9327c37c 13Release: 2
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}
919dc77f 27BuildRequires: python3-devel >= 1:3.5
df80b467 28BuildRequires: python3-modules
919dc77f 29BuildRequires: python3-setuptools
df80b467 30%endif
919dc77f 31Requires: python-modules >= 1:2.7
dfacf687
MK
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35MessagePack is a binary-based efficient object serialization library.
36It enables to exchange structured objects between many languages like
37JSON. But unlike JSON, it is very fast and small.
38
39%description -l pl.UTF-8
919dc77f
JB
40MessagePack to biblioteka do binarnej, efektywnej serializacji
41obiektów. Pozwala wymieniać strukturalne obiekty pomiędzy wieloma
42językami, podobnie jak JSON. W odróżnieniu od JSON-a jest bardzo
43szybka i mała.
dfacf687 44
df80b467 45%package -n python3-%{module}
2d81bbdb 46Summary: Binary-based efficient data interchange format
919dc77f 47Summary(pl.UTF-8): Binarny, efektywny format wymiany danych
df80b467 48Group: Libraries/Python
919dc77f 49Requires: python3-modules >= 1:3.5
df80b467
MK
50
51%description -n python3-%{module}
52MessagePack is a binary-based efficient object serialization library.
53It enables to exchange structured objects between many languages like
54JSON. But unlike JSON, it is very fast and small.
55
56%description -n python3-%{module} -l pl.UTF-8
919dc77f
JB
57MessagePack to biblioteka do binarnej, efektywnej serializacji
58obiektów. Pozwala wymieniać strukturalne obiekty pomiędzy wieloma
59językami, podobnie jak JSON. W odróżnieniu od JSON-a jest bardzo
60szybka i mała.
df80b467 61
dfacf687 62%prep
278786e8 63%setup -q -n %{module}-%{version}
dfacf687
MK
64
65%build
df80b467 66%if %{with python2}
919dc77f
JB
67%py_build
68
69%if %{with tests}
70%{__python} -m pytest test
71%endif
df80b467
MK
72%endif
73
74%if %{with python3}
919dc77f 75%py3_build
df80b467 76
919dc77f
JB
77%if %{with tests}
78%{__python3} -m pytest test
79%endif
df80b467 80%endif
dfacf687
MK
81
82%install
83rm -rf $RPM_BUILD_ROOT
919dc77f 84
df80b467 85%if %{with python2}
5b646f98 86%py_install
919dc77f 87
dfacf687 88%py_postclean
df80b467
MK
89%endif
90
91%if %{with python3}
5b646f98 92%py3_install
df80b467 93%endif
dfacf687
MK
94
95%clean
96rm -rf $RPM_BUILD_ROOT
97
df80b467 98%if %{with python2}
dfacf687
MK
99%files
100%defattr(644,root,root,755)
2fb16dc5
JR
101%doc COPYING README.md
102%dir %{py_sitescriptdir}/%{module}
103%{py_sitescriptdir}/%{module}/*.py[co]
104%{py_sitescriptdir}/msgpack-%{version}-py*.egg-info
df80b467 105%endif
df80b467
MK
106
107%if %{with python3}
108%files -n python3-%{module}
109%defattr(644,root,root,755)
2fb16dc5 110%doc COPYING README.md
df80b467 111%dir %{py3_sitedir}/%{module}
2fb16dc5 112%attr(755,root,root) %{py3_sitedir}/%{module}/_cmsgpack.cpython-*.so
df80b467
MK
113%{py3_sitedir}/%{module}/*.py
114%{py3_sitedir}/%{module}/__pycache__
278786e8 115%{py3_sitedir}/msgpack-%{version}-py*.egg-info
df80b467 116%endif
This page took 0.410394 seconds and 4 git commands to generate.