]>
Commit | Line | Data |
---|---|---|
cbb5ea63 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
4 | %bcond_without tests # unit tests | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | Summary: Serialize all of Python | |
9 | Summary(pl.UTF-8): Serializacja całości Pythona | |
10 | Name: python-dill | |
11 | Version: 0.3.3 | |
bdb2d3c9 | 12 | Release: 4 |
cbb5ea63 JB |
13 | License: BSD |
14 | Group: Libraries/Python | |
15 | #Source0Download: https://pypi.org/simple/dill/ | |
16 | Source0: https://files.pythonhosted.org/packages/source/d/dill/dill-%{version}.zip | |
17 | # Source0-md5: 99c878e2e4e924f3234c0efcbcff6abf | |
18 | URL: https://pypi.org/project/dill/ | |
19 | %if %{with python2} | |
20 | BuildRequires: python-modules >= 1:2.7 | |
21 | BuildRequires: python-setuptools | |
22 | %endif | |
23 | %if %{with python3} | |
24 | BuildRequires: python3-modules >= 1:3.5 | |
25 | BuildRequires: python3-setuptools | |
26 | %endif | |
27 | BuildRequires: rpm-pythonprov | |
28 | BuildRequires: rpmbuild(macros) >= 1.714 | |
29 | BuildRequires: unzip | |
30 | %if %{with doc} | |
31 | BuildRequires: sphinx-pdg | |
32 | %endif | |
33 | Requires: python-modules >= 1:2.7 | |
34 | BuildArch: noarch | |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %description | |
38 | dill extends Python's pickle module for serializing and de-serializing | |
39 | Python objects to the majority of the built-in Python types. | |
40 | Serialization is the process of converting an object to a byte stream, | |
41 | and the inverse of which is converting a byte stream back to a Python | |
42 | object hierarchy. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | dill rozszerza moduł Pythona pickle do serializacji i deserializacji | |
46 | obiektów pythonowych na większość wbudowanych typów Pythona. | |
47 | Serializacja to proces przekształcania obiektu na strumień bajtów, a | |
48 | deserializacja - odwrotność, czyli konwersja strumienia bajtów z | |
49 | powrotem do hierarchii obiektów Pythona. | |
50 | ||
51 | %package -n python3-dill | |
52 | Summary: Serialize all of Python | |
53 | Summary(pl.UTF-8): Serializacja całości Pythona | |
54 | Group: Libraries/Python | |
55 | Requires: python3-modules >= 1:3.5 | |
56 | ||
57 | %description -n python3-dill | |
58 | dill extends Python's pickle module for serializing and de-serializing | |
59 | Python objects to the majority of the built-in Python types. | |
60 | Serialization is the process of converting an object to a byte stream, | |
61 | and the inverse of which is converting a byte stream back to a Python | |
62 | object hierarchy. | |
63 | ||
64 | %description -n python3-dill -l pl.UTF-8 | |
65 | dill rozszerza moduł Pythona pickle do serializacji i deserializacji | |
66 | obiektów pythonowych na większość wbudowanych typów Pythona. | |
67 | Serializacja to proces przekształcania obiektu na strumień bajtów, a | |
68 | deserializacja - odwrotność, czyli konwersja strumienia bajtów z | |
69 | powrotem do hierarchii obiektów Pythona. | |
70 | ||
71 | %package apidocs | |
72 | Summary: API documentation for Python dill module | |
73 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona dill | |
74 | Group: Documentation | |
75 | ||
76 | %description apidocs | |
77 | API documentation for Python dill module. | |
78 | ||
79 | %description apidocs -l pl.UTF-8 | |
80 | Dokumentacja API modułu Pythona dill. | |
81 | ||
82 | %prep | |
83 | %setup -q -n dill-%{version} | |
84 | ||
85 | %build | |
86 | %if %{with python2} | |
87 | %py_build | |
88 | ||
89 | %if %{with tests} | |
90 | PYTHONPATH=$(pwd) \ | |
91 | %{__python} tests/__main__.py | |
92 | %endif | |
93 | %endif | |
94 | ||
95 | %if %{with python3} | |
96 | %py3_build | |
97 | ||
98 | %if %{with tests} | |
99 | PYTHONPATH=$(pwd) \ | |
100 | %{__python3} tests/__main__.py | |
101 | %endif | |
102 | %endif | |
103 | ||
104 | %if %{with doc} | |
105 | PYTHONPATH=$(pwd) \ | |
106 | %{__make} -C docs html | |
107 | %endif | |
108 | ||
109 | %install | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %if %{with python2} | |
113 | %py_install | |
114 | ||
115 | for bin in get_objgraph undill ; do | |
116 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/${bin} $RPM_BUILD_ROOT%{_bindir}/${bin}-2 | |
117 | done | |
118 | ||
119 | %py_postclean | |
120 | %endif | |
121 | ||
122 | %if %{with python3} | |
123 | %py3_install | |
124 | ||
125 | for bin in get_objgraph undill ; do | |
126 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/${bin} $RPM_BUILD_ROOT%{_bindir}/${bin}-3 | |
127 | done | |
128 | %endif | |
129 | ||
130 | %clean | |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
133 | %if %{with python2} | |
134 | %files | |
135 | %defattr(644,root,root,755) | |
136 | %doc DEV_NOTES LICENSE README.md | |
137 | %attr(755,root,root) %{_bindir}/get_objgraph-2 | |
138 | %attr(755,root,root) %{_bindir}/undill-2 | |
139 | %{py_sitescriptdir}/dill | |
140 | %{py_sitescriptdir}/dill-%{version}-py*.egg-info | |
141 | %endif | |
142 | ||
143 | %if %{with python3} | |
144 | %files -n python3-dill | |
145 | %defattr(644,root,root,755) | |
146 | %doc DEV_NOTES LICENSE README.md | |
147 | %attr(755,root,root) %{_bindir}/get_objgraph-3 | |
148 | %attr(755,root,root) %{_bindir}/undill-3 | |
149 | %{py3_sitescriptdir}/dill | |
150 | %{py3_sitescriptdir}/dill-%{version}-py*.egg-info | |
151 | %endif | |
152 | ||
153 | %if %{with doc} | |
154 | %files apidocs | |
155 | %defattr(644,root,root,755) | |
156 | %doc docs/build/{_static,*.html,*.js} | |
157 | %endif |