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+)
7 Summary: Backport of Python 3.4 Enum
8 Summary(pl.UTF-8): Backport klasy Enum z Pythona 3.4
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
21 BuildRequires: python >= 1:2.4
22 BuildRequires: python-modules >= 1:2.4
25 BuildRequires: python3 >= 1:3.2
26 BuildRequires: python3-modules >= 1:3.2
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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.
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
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,
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
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.
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
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
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.
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
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,
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
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.
95 %setup -q -n enum34-%{version}
101 %{?with_tests:PYTHONPATH=lib %{__python} lib/enum/test.py}
108 %{?with_tests:PYTHONPATH=lib %{__python3} lib/enum/test.py}
113 rm -rf $RPM_BUILD_ROOT
117 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/enum/{LICENSE,README,doc}
118 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/enum/test.py*
126 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/enum/{LICENSE,README,doc}
127 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/enum/test.py
132 rm -rf $RPM_BUILD_ROOT
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
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