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