]> git.pld-linux.org Git - packages/python-enum34.git/blob - python-enum34.spec
- updated to 1.1.10
[packages/python-enum34.git] / python-enum34.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_with     python3 # CPython 3.x module (not needed for Python 3.4+)
6
7 Summary:        Backport of Python 3.4 Enum
8 Summary(pl.UTF-8):      Backport klasy Enum z Pythona 3.4
9 Name:           python-enum34
10 Version:        1.1.10
11 Release:        1
12 License:        BSD
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/enum34/
15 Source0:        https://files.pythonhosted.org/packages/source/e/enum34/enum34-%{version}.tar.gz
16 # Source0-md5:  b5ac0bb5ea9e830029599e410d09d3b5
17 URL:            https://pypi.org/project/enum34/
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 %if %{with python2}
21 BuildRequires:  python >= 1:2.4
22 BuildRequires:  python-modules >= 1:2.4
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3 >= 1:3.2
26 BuildRequires:  python3-modules >= 1:3.2
27 %endif
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 Python 3.4 introduced official support for enumerations. This is a
33 backport of that feature to Python 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and
34 2.4.
35
36 An enumeration is a set of symbolic names (members) bound to unique,
37 constant values. Within an enumeration, the members can be compared by
38 identity, and the enumeration itself can be iterated over.
39
40 This module defines two enumeration classes that can be used to define
41 unique sets of names and values: Enum and IntEnum. It also defines one
42 decorator, unique, that ensures only unique member names are present
43 in an enumeration.
44
45 %description -l pl.UTF-8
46 Python wraz z wersją 3.4 wprowadził obsługę typów wyliczeniowych. Ten
47 pakiet to backport tego elementu języka do Pythona 3.3, 3.2, 3.2, 2.7,
48 2.6, 2.5 oraz 2.4.
49
50 Typ wyliczeniowy to zbiór nazw symbolicznych (elementów) ograniczonych
51 do unikatowych, stałych wartości. Wewnątrz typu wyliczeniowego jego
52 elementy można porównywać pod kątem identyczności oraz iterować po
53 nich.
54
55 Moduł definiuje dwie klasy wyliczeniowe, których można używać do
56 definiowania unikatowych zbiorów nazw i wartości: Enum oraz IntEnum.
57 Definiuje także jeden dekorator (unique), zapewniający obecność
58 wyłącznie unikatowych nazw elementów w typie wyliczeniowym.
59
60 %package -n python3-enum34
61 Summary:        Backport of Python 3.4 Enum
62 Summary(pl.UTF-8):      Backport klasy Enum z Pythona 3.4
63 Group:          Libraries/Python
64
65 %description -n python3-enum34
66 Python 3.4 introduced official support for enumerations. This is a
67 backport of that feature to Python 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and
68 2.4.
69
70 An enumeration is a set of symbolic names (members) bound to unique,
71 constant values. Within an enumeration, the members can be compared by
72 identity, and the enumeration itself can be iterated over.
73
74 This module defines two enumeration classes that can be used to define
75 unique sets of names and values: Enum and IntEnum. It also defines one
76 decorator, unique, that ensures only unique member names are present
77 in an enumeration.
78
79 %description -n python3-enum34 -l pl.UTF-8
80 Python wraz z wersją 3.4 wprowadził obsługę typów wyliczeniowych. Ten
81 pakiet to backport tego elementu języka do Pythona 3.3, 3.2, 3.2, 2.7,
82 2.6, 2.5 oraz 2.4.
83
84 Typ wyliczeniowy to zbiór nazw symbolicznych (elementów) ograniczonych
85 do unikatowych, stałych wartości. Wewnątrz typu wyliczeniowego jego
86 elementy można porównywać pod kątem identyczności oraz iterować po
87 nich.
88
89 Moduł definiuje dwie klasy wyliczeniowe, których można używać do
90 definiowania unikatowych zbiorów nazw i wartości: Enum oraz IntEnum.
91 Definiuje także jeden dekorator (unique), zapewniający obecność
92 wyłącznie unikatowych nazw elementów w typie wyliczeniowym.
93
94 %prep
95 %setup -q -n enum34-%{version}
96
97 %build
98 %if %{with python2}
99 %py_build
100 cd build-2
101 %{?with_tests:PYTHONPATH=lib %{__python} lib/enum/test.py}
102 cd ..
103 %endif
104
105 %if %{with python3}
106 %py3_build
107 cd build-3
108 %{?with_tests:PYTHONPATH=lib %{__python3} lib/enum/test.py}
109 cd ..
110 %endif
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114 %if %{with python2}
115 %py_install
116
117 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/enum/{LICENSE,README,doc}
118 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/enum/test.py*
119
120 %py_postclean
121 %endif
122
123 %if %{with python3}
124 %py3_install
125
126 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/enum/{LICENSE,README,doc}
127 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/enum/test.py
128 %endif
129
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %if %{with python2}
135 %files
136 %defattr(644,root,root,755)
137 %doc enum/LICENSE enum/README enum/doc/enum.rst
138 %dir %{py_sitescriptdir}/enum
139 %{py_sitescriptdir}/enum/*.py[co]
140 %{py_sitescriptdir}/enum34-%{version}-py*.egg-info
141 %endif
142
143 %if %{with python3}
144 %files -n python3-enum34
145 %defattr(644,root,root,755)
146 %doc enum/LICENSE enum/README enum/doc/enum.rst
147 %{py3_sitescriptdir}/enum/*.py
148 %{py3_sitescriptdir}/enum/__pycache__
149 %{py3_sitescriptdir}/enum34-%{version}-py*.egg-info
150 %endif
This page took 0.152297 seconds and 3 git commands to generate.