3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Serialization based on ast.literal_eval
8 Summary(pl.UTF-8): Serializacja oparta na ast.literal_eval
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
16 # Source0-md5: cbef4f9c88f88c38195d11a0363a095f
17 URL: https://pypi.org/project/serpent/
18 BuildRequires: python3-modules >= 1:3.5
19 BuildRequires: python3-setuptools
21 BuildRequires: python3-attrs
22 BuildRequires: python3-pytz
24 BuildRequires: rpm-pythonprov
25 BuildRequires: rpmbuild(macros) >= 1.714
26 Requires: python3-modules >= 1:3.5
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Serpent is a simple serialization library based on ast.literal_eval.
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.
37 %description -l pl.UTF-8
38 Serpent to prosta biblioteka serializacji oparta na ast.literal_eval.
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.
45 %setup -q -n serpent-%{version}
51 %{__python3} -m unittest discover -s tests
55 rm -rf $RPM_BUILD_ROOT
60 rm -rf $RPM_BUILD_ROOT
63 %defattr(644,root,root,755)
64 %doc LICENSE README.md
65 %{py3_sitescriptdir}/serpent.py
66 %{py3_sitescriptdir}/__pycache__/serpent.cpython-*.py[co]
67 %{py3_sitescriptdir}/serpent-%{version}-py*.egg-info