]>
Commit | Line | Data |
---|---|---|
56c07bdb JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Serialization based on ast.literal_eval | |
8 | Summary(pl.UTF-8): Serializacja oparta na ast.literal_eval | |
a2892557 JB |
9 | Name: python3-serpent |
10 | Version: 1.30.2 | |
161e2501 | 11 | Release: 4 |
56c07bdb JB |
12 | License: MIT |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/serpent/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/s/serpent/serpent-%{version}.tar.gz | |
a2892557 | 16 | # Source0-md5: cbef4f9c88f88c38195d11a0363a095f |
56c07bdb | 17 | URL: https://pypi.org/project/serpent/ |
a2892557 | 18 | BuildRequires: python3-modules >= 1:3.5 |
56c07bdb JB |
19 | BuildRequires: python3-setuptools |
20 | %if %{with tests} | |
21 | BuildRequires: python3-attrs | |
22 | BuildRequires: python3-pytz | |
23 | %endif | |
56c07bdb JB |
24 | BuildRequires: rpm-pythonprov |
25 | BuildRequires: rpmbuild(macros) >= 1.714 | |
a2892557 | 26 | Requires: python3-modules >= 1:3.5 |
56c07bdb JB |
27 | BuildArch: noarch |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | Serpent is a simple serialization library based on ast.literal_eval. | |
32 | ||
33 | Because it only serializes literals and recreates the objects using | |
34 | ast.literal_eval(), the serialized data is safe to transport to other | |
35 | machines (over the network for instance) and de-serialize it there. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | Serpent to prosta biblioteka serializacji oparta na ast.literal_eval. | |
39 | ||
40 | Ponieważ serializuje tylko ciągi znaków i tworzy obiekty przy użyciu | |
41 | ast.literal_eval(), zserializowane dane są bezpieczne do przesyłania | |
42 | na inne maszyny (np. po sieci) i deserializacji na nich. | |
43 | ||
56c07bdb JB |
44 | %prep |
45 | %setup -q -n serpent-%{version} | |
46 | ||
47 | %build | |
56c07bdb JB |
48 | %py3_build |
49 | ||
50 | %if %{with tests} | |
51 | %{__python3} -m unittest discover -s tests | |
52 | %endif | |
56c07bdb JB |
53 | |
54 | %install | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
56c07bdb | 57 | %py3_install |
56c07bdb JB |
58 | |
59 | %clean | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
56c07bdb JB |
62 | %files |
63 | %defattr(644,root,root,755) | |
64 | %doc LICENSE README.md | |
56c07bdb JB |
65 | %{py3_sitescriptdir}/serpent.py |
66 | %{py3_sitescriptdir}/__pycache__/serpent.cpython-*.py[co] | |
67 | %{py3_sitescriptdir}/serpent-%{version}-py*.egg-info |