]> git.pld-linux.org Git - packages/python-msgpack.git/blob - python-msgpack.spec
9c455a56d123c77df9333c6aff34346c9cb08e04
[packages/python-msgpack.git] / python-msgpack.spec
1 #
2 # Conditional build:
3 %bcond_with     doc             # don't build doc
4 %bcond_without  tests   # do not perform "make test"
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  msgpack
9 %define         pypi_name       msgpack-python
10 Summary:        Binary-based efficient data interchange format
11 Summary(pl.UTF-8):      Binarny efektywny format wymiany danych.
12 Name:           python-%{module}
13 Version:        0.5.6
14 Release:        3
15 License:        ASL
16 Group:          Development/Languages/Python
17 Source0:        https://pypi.debian.net/msgpack/%{module}-%{version}.tar.gz
18 # Source0-md5:  9dfceb24c6e4e7de032687ee5a7ef4d6
19 URL:            http://msgpack.org/
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.710
23 %if %{with python2}
24 BuildRequires:  python-devel
25 BuildRequires:  python-distribute
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-devel
29 BuildRequires:  python3-distribute
30 BuildRequires:  python3-modules
31 %endif
32 Requires:       python-modules
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 jest binarną, efektywną biblioteką serializacji obiektów.
42 Pozwala wymieniać strukturalne obiekty pomiędzy wieloma językami
43 podobnie jak JSON. W odróżnieniu jest bardzo szybka i mała.
44
45 %package -n python3-%{module}
46 Summary:        Binary-based efficient data interchange format
47 Summary(pl.UTF-8):      Binarny efektywny format wymiany danych.
48 Group:          Libraries/Python
49 Requires:       python3-modules
50
51 %description -n python3-%{module}
52 MessagePack is a binary-based efficient object serialization library.
53 It enables to exchange structured objects between many languages like
54 JSON. But unlike JSON, it is very fast and small.
55
56 %description -n python3-%{module} -l pl.UTF-8
57 MessagePack jest binarną, efektywną biblioteką serializacji obiektów.
58 Pozwala wymieniać strukturalne obiekty pomiędzy wieloma językami
59 podobnie jak JSON. W odróżnieniu jest bardzo szybka i mała.
60
61 %package apidocs
62 Summary:        %{module} API documentation
63 Summary(pl.UTF-8):      Dokumentacja API %{module}
64 Group:          Documentation
65
66 %description apidocs
67 API documentation for %{module}.
68
69 %description apidocs -l pl.UTF-8
70 Dokumentacja API %{module}.
71
72 %prep
73 %setup -q -n %{module}-%{version}
74
75 %build
76 %if %{with python2}
77 %py_build %{?with_tests:test}
78 %endif
79
80 %if %{with python3}
81 %py3_build %{?with_tests:test}
82 %endif
83
84 %if %{with doc}
85 cd docs
86 %{__make} -j1 html
87 rm -rf _build/html/_sources
88 %endif
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92 %if %{with python2}
93 %py_install
94 %py_postclean
95 %endif
96
97 %if %{with python3}
98 %py3_install
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %files
106 %defattr(644,root,root,755)
107 %doc COPYING README.rst
108 %dir %{py_sitedir}/%{module}
109 %{py_sitedir}/%{module}/*.py[co]
110 %attr(755,root,root) %{py_sitedir}/%{module}/_packer.so
111 %attr(755,root,root) %{py_sitedir}/%{module}/_unpacker.so
112 %{py_sitedir}/msgpack-%{version}-py*.egg-info
113 %endif
114
115 %if %{with python3}
116 %files -n python3-%{module}
117 %defattr(644,root,root,755)
118 %doc COPYING README.rst
119 %dir %{py3_sitedir}/%{module}
120 %attr(755,root,root) %{py3_sitedir}/%{module}/_packer.cpython-*.so
121 %attr(755,root,root) %{py3_sitedir}/%{module}/_unpacker.cpython-*.so
122 %{py3_sitedir}/%{module}/*.py
123 %{py3_sitedir}/%{module}/__pycache__
124 %{py3_sitedir}/msgpack-%{version}-py*.egg-info
125 %endif
126
127 %if %{with doc}
128 %files apidocs
129 %defattr(644,root,root,755)
130 %doc docs/_build/html/*
131 %endif
This page took 0.087901 seconds and 2 git commands to generate.