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