]> git.pld-linux.org Git - packages/python-msgpack.git/blob - python-msgpack.spec
- release 4 (by relup.sh)
[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 Summary:        Binary-based efficient data interchange format
10 Summary(pl.UTF-8):      Binarny efektywny format wymiany danych.
11 Name:           python-%{module}
12 Version:        0.4.5
13 Release:        4
14 License:        ASL
15 Group:          Development/Languages/Python
16 Source0:        http://pypi.python.org/packages/source/m/msgpack-python/msgpack-python-%{version}.tar.gz
17 # Source0-md5:  3b82bc542d5599896695512e7c32f42d
18 URL:            http://msgpack.org/
19 BuildRequires:  rpm-pythonprov
20 # if py_postclean is used
21 BuildRequires:  rpmbuild(macros) >= 1.219
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
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:        -
47 Summary(pl.UTF-8):      -
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 msgpack-python-%{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
93 %if %{with python2}
94 %py_install
95
96 %py_postclean
97 %endif
98
99 %if %{with python3}
100 %py3_install
101 %endif
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with python2}
107 %files
108 %defattr(644,root,root,755)
109 %doc COPYING README.rst
110 %dir %{py_sitedir}/%{module}
111 %{py_sitedir}/%{module}/*.py[co]
112 %attr(755,root,root) %{py_sitedir}/%{module}/_packer.so
113 %attr(755,root,root) %{py_sitedir}/%{module}/_unpacker.so
114 %if "%{py_ver}" > "2.4"
115 %{py_sitedir}/msgpack_python-%{version}-py*.egg-info
116 %endif
117 %endif
118
119 %if %{with python3}
120 %files -n python3-%{module}
121 %defattr(644,root,root,755)
122 %doc COPYING README.rst
123 %dir %{py3_sitedir}/%{module}
124 %attr(755,root,root) %{py3_sitedir}/%{module}/_packer.cpython-*.so
125 %attr(755,root,root) %{py3_sitedir}/%{module}/_unpacker.cpython-*.so
126 %{py3_sitedir}/%{module}/*.py
127 %{py3_sitedir}/%{module}/__pycache__
128 %{py3_sitedir}/msgpack_python-%{version}-py*.egg-info
129 %endif
130
131 %if %{with doc}
132 %files apidocs
133 %defattr(644,root,root,755)
134 %doc docs/_build/html/*
135 %endif
This page took 0.053927 seconds and 3 git commands to generate.