]> git.pld-linux.org Git - packages/python-serpent.git/blob - python-serpent.spec
- release 2 (by relup.sh)
[packages/python-serpent.git] / python-serpent.spec
1 # NOTE: for versions >= 1.30 (for Python 3.5+) see python3-serpent.spec
2 #
3 # Conditional build:
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_with     python3 # CPython 3.x module (built from python3-serpent.spec)
7
8 Summary:        Serialization based on ast.literal_eval
9 Summary(pl.UTF-8):      Serializacja oparta na ast.literal_eval
10 Name:           python-serpent
11 # keep 1.2x here for python2 support
12 Version:        1.28
13 Release:        2
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/serpent/
17 Source0:        https://files.pythonhosted.org/packages/source/s/serpent/serpent-%{version}.tar.gz
18 # Source0-md5:  15ef8b67c76a6d19bac9c16731a1e62a
19 URL:            https://pypi.org/project/serpent/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-attrs
25 BuildRequires:  python-enum34
26 BuildRequires:  python-pytz
27 %endif
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-modules >= 1:3.4
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
33 BuildRequires:  python3-attrs
34 BuildRequires:  python3-pytz
35 %endif
36 %endif
37 BuildRequires:  rpm-pythonprov
38 BuildRequires:  rpmbuild(macros) >= 1.714
39 Requires:       python-modules >= 1:2.7
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 Serpent is a simple serialization library based on ast.literal_eval.
45
46 Because it only serializes literals and recreates the objects using
47 ast.literal_eval(), the serialized data is safe to transport to other
48 machines (over the network for instance) and de-serialize it there.
49
50 %description -l pl.UTF-8
51 Serpent to prosta biblioteka serializacji oparta na ast.literal_eval.
52
53 Ponieważ serializuje tylko ciągi znaków i tworzy obiekty przy użyciu
54 ast.literal_eval(), zserializowane dane są bezpieczne do przesyłania
55 na inne maszyny (np. po sieci) i deserializacji na nich.
56
57 %package -n python3-serpent
58 Summary:        Serialization based on ast.literal_eval
59 Summary(pl.UTF-8):      Serializacja oparta na ast.literal_eval
60 Group:          Libraries/Python
61 Requires:       python3-modules >= 1:3.4
62
63 %description -n python3-serpent
64 Serpent is a simple serialization library based on ast.literal_eval.
65
66 Because it only serializes literals and recreates the objects using
67 ast.literal_eval(), the serialized data is safe to transport to other
68 machines (over the network for instance) and de-serialize it there.
69
70 %description -n python3-serpent -l pl.UTF-8
71 Serpent to prosta biblioteka serializacji oparta na ast.literal_eval.
72
73 Ponieważ serializuje tylko ciągi znaków i tworzy obiekty przy użyciu
74 ast.literal_eval(), zserializowane dane są bezpieczne do przesyłania
75 na 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
98 rm -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
111 rm -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.093634 seconds and 3 git commands to generate.