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