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