]> git.pld-linux.org Git - packages/python-serpent.git/blame - python-serpent.spec
- release 2 (by relup.sh)
[packages/python-serpent.git] / python-serpent.spec
CommitLineData
0cb0d8d1 1# NOTE: for versions >= 1.30 (for Python 3.5+) see python3-serpent.spec
56c07bdb
JB
2#
3# Conditional build:
4%bcond_without tests # unit tests
5%bcond_without python2 # CPython 2.x module
0cb0d8d1 6%bcond_with python3 # CPython 3.x module (built from python3-serpent.spec)
56c07bdb
JB
7
8Summary: Serialization based on ast.literal_eval
9Summary(pl.UTF-8): Serializacja oparta na ast.literal_eval
10Name: python-serpent
11# keep 1.2x here for python2 support
12Version: 1.28
0708bf98 13Release: 2
56c07bdb
JB
14License: MIT
15Group: Libraries/Python
16#Source0Download: https://pypi.org/simple/serpent/
17Source0: https://files.pythonhosted.org/packages/source/s/serpent/serpent-%{version}.tar.gz
18# Source0-md5: 15ef8b67c76a6d19bac9c16731a1e62a
19URL: https://pypi.org/project/serpent/
20%if %{with python2}
21BuildRequires: python-modules >= 1:2.7
22BuildRequires: python-setuptools
23%if %{with tests}
24BuildRequires: python-attrs
25BuildRequires: python-enum34
26BuildRequires: python-pytz
27%endif
28%endif
29%if %{with python3}
30BuildRequires: python3-modules >= 1:3.4
31BuildRequires: python3-setuptools
32%if %{with tests}
33BuildRequires: python3-attrs
34BuildRequires: python3-pytz
35%endif
36%endif
37BuildRequires: rpm-pythonprov
38BuildRequires: rpmbuild(macros) >= 1.714
39Requires: python-modules >= 1:2.7
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44Serpent is a simple serialization library based on ast.literal_eval.
45
46Because it only serializes literals and recreates the objects using
47ast.literal_eval(), the serialized data is safe to transport to other
48machines (over the network for instance) and de-serialize it there.
49
50%description -l pl.UTF-8
51Serpent to prosta biblioteka serializacji oparta na ast.literal_eval.
52
53Ponieważ serializuje tylko ciągi znaków i tworzy obiekty przy użyciu
54ast.literal_eval(), zserializowane dane są bezpieczne do przesyłania
55na inne maszyny (np. po sieci) i deserializacji na nich.
56
57%package -n python3-serpent
58Summary: Serialization based on ast.literal_eval
59Summary(pl.UTF-8): Serializacja oparta na ast.literal_eval
60Group: Libraries/Python
61Requires: python3-modules >= 1:3.4
62
63%description -n python3-serpent
64Serpent is a simple serialization library based on ast.literal_eval.
65
66Because it only serializes literals and recreates the objects using
67ast.literal_eval(), the serialized data is safe to transport to other
68machines (over the network for instance) and de-serialize it there.
69
70%description -n python3-serpent -l pl.UTF-8
71Serpent to prosta biblioteka serializacji oparta na ast.literal_eval.
72
73Ponieważ serializuje tylko ciągi znaków i tworzy obiekty przy użyciu
74ast.literal_eval(), zserializowane dane są bezpieczne do przesyłania
75na inne maszyny (np. po sieci) i deserializacji na nich.
76
77%prep
78%setup -q -n serpent-%{version}
79
80%build
81%if %{with python2}
82%py_build
83
84%if %{with tests}
85%{__python} -m unittest discover -s tests
86%endif
87%endif
88
89%if %{with python3}
90%py3_build
91
92%if %{with tests}
93%{__python3} -m unittest discover -s tests
94%endif
95%endif
96
97%install
98rm -rf $RPM_BUILD_ROOT
99
100%if %{with python2}
101%py_install
102
103%py_postclean
104%endif
105
106%if %{with python3}
107%py3_install
108%endif
109
110%clean
111rm -rf $RPM_BUILD_ROOT
112
113%if %{with python2}
114%files
115%defattr(644,root,root,755)
116%doc LICENSE README.md
117%{py_sitescriptdir}/serpent.py[co]
118%{py_sitescriptdir}/serpent-%{version}-py*.egg-info
119%endif
120
121%if %{with python3}
122%files -n python3-serpent
123%defattr(644,root,root,755)
124%doc LICENSE README.md
125%{py3_sitescriptdir}/serpent.py
126%{py3_sitescriptdir}/__pycache__/serpent.cpython-*.py[co]
127%{py3_sitescriptdir}/serpent-%{version}-py*.egg-info
128%endif
This page took 0.072073 seconds and 4 git commands to generate.