]>
Commit | Line | Data |
---|---|---|
f9f71138 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # unit tests (one fails on pytest.skip???) | |
4 | ||
5 | Summary: Extended pickling support for Python objects | |
6 | Summary(pl.UTF-8): Rozszerzona obsługa operacji pickle dla obiektów pythonowych | |
7 | Name: python3-cloudpickle | |
8 | Version: 1.6.0 | |
25f150b3 | 9 | Release: 4 |
f9f71138 JB |
10 | License: BSD |
11 | Group: Libraries/Python | |
12 | #Source0Download: https://pypi.org/simple/cloudpickle/ | |
13 | Source0: https://files.pythonhosted.org/packages/source/c/cloudpickle/cloudpickle-%{version}.tar.gz | |
14 | # Source0-md5: f1202c1f0002166bfc785853c4684a82 | |
15 | URL: https://pypi.org/project/cloudpickle/ | |
16 | BuildRequires: python3-modules >= 1:3.5 | |
17 | BuildRequires: python3-setuptools | |
18 | %if %{with tests} | |
19 | BuildRequires: python3-numpy | |
20 | BuildRequires: python3-pytest | |
21 | BuildRequires: python3-scipy | |
22 | BuildRequires: python3-tornado | |
23 | %endif | |
24 | BuildRequires: rpm-pythonprov | |
25 | BuildRequires: rpmbuild(macros) >= 1.714 | |
26 | Requires: python3-modules >= 1:3.5 | |
27 | BuildArch: noarch | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | cloudpickle makes it possible to serialize Python constructs not | |
32 | supported by the default pickle module from the Python standard | |
33 | library. | |
34 | ||
35 | cloudpickle is especially useful for cluster computing where Python | |
36 | code is shipped over the network to execute on remote hosts, possibly | |
37 | close to the data. | |
38 | ||
39 | Among other things, cloudpickle supports pickling for lambda functions | |
40 | along with functions and classes defined interactively in the __main__ | |
41 | module (for instance in a script, a shell or a Jupyter notebook). | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | cloudpickle pozwala serializować konstrukcje pythonowe nie obsługiwane | |
45 | domyślnie przez moduł pickle z biblioteki standardowej Pythona. | |
46 | ||
47 | cloudpickle jest przydatne szczególnie przy obliczeniach klastrowych, | |
48 | gdzie kod pythonowy jest rozmieszczony po sieci, aby wykonywał się na | |
49 | zdalnych maszynach, możliwie blisko danych. | |
50 | ||
51 | cloudpickle obsługuje m.in. operacje pickle na funkcjach lambda oraz | |
52 | funkcjach lub klasach definiowanych interaktywnie w module __main__ | |
53 | (np. w skrypcie, z powłoki lub w postaci Jupyter notebook). | |
54 | ||
55 | %prep | |
56 | %setup -q -n cloudpickle-%{version} | |
57 | ||
58 | %build | |
59 | %py3_build | |
60 | ||
61 | %if %{with tests} | |
62 | PYTHONPATH=$(pwd)/tests/cloudpickle_testpkg \ | |
63 | %{__python3} -m unittest tests/cloudpickle_test.py tests/cloudpickle_file_test.py | |
64 | %endif | |
65 | ||
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %py3_install | |
70 | ||
71 | %clean | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
74 | %files | |
75 | %defattr(644,root,root,755) | |
76 | %doc LICENSE README.md | |
77 | %{py3_sitescriptdir}/cloudpickle | |
78 | %{py3_sitescriptdir}/cloudpickle-%{version}-py*.egg-info |