]> git.pld-linux.org Git - packages/python-enum34.git/blame - python-enum34.spec
- release 2 (by relup.sh)
[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
8Name: python-enum34
9Version: 1.0.4
ce6a1439 10Release: 2
f65af884
ER
11License: BSD
12Group: Development/Libraries
13Source0: https://pypi.python.org/packages/source/e/enum34/enum34-%{version}.tar.gz
14# Source0-md5: ac80f432ac9373e7d162834b264034b6
15URL: https://pypi.python.org/pypi/enum34
16BuildRequires: rpm-pythonprov
17BuildRequires: rpmbuild(macros) >= 1.219
18%if %{with python2}
19BuildRequires: python
20BuildRequires: python-setuptools
21%endif
22%if %{with python3}
23BuildRequires: python3
24BuildRequires: python3-setuptools
25%endif
26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30Python 3.4 introduced official support for enumerations. This is a
e6182a11 31backport of that feature to Python 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and
f65af884
ER
322.4.
33
34An enumeration is a set of symbolic names (members) bound to unique,
35constant values. Within an enumeration, the members can be compared by
36identity, and the enumeration itself can be iterated over.
37
38This module defines two enumeration classes that can be used to define
39unique sets of names and values: Enum and IntEnum. It also defines one
40decorator, unique, that ensures only unique member names are present
41in an enumeration.
42
43%package -n python3-enum34
44Summary: Backport of Python 3.4 Enum
45Group: Development/Libraries
46
47%description -n python3-enum34
48Python 3.4 introduced official support for enumerations. This is a
e6182a11 49backport of that feature to Python 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and
f65af884
ER
502.4.
51
52An enumeration is a set of symbolic names (members) bound to unique,
53constant values. Within an enumeration, the members can be compared by
54identity, and the enumeration itself can be iterated over.
55
56This module defines two enumeration classes that can be used to define
57unique sets of names and values: Enum and IntEnum. It also defines one
58decorator, unique, that ensures only unique member names are present
59in an enumeration.
60
61%prep
62%setup -q -n enum34-%{version}
63
64%build
65%if %{with python2}
18f31992 66%py_build
f65af884
ER
67%{?with_tests:%{__python} enum/test_enum.py}
68%endif
69
70%if %{with python3}
18f31992 71%py3_build
f65af884
ER
72%{?with_tests:%{__python3} enum/test_enum.py}
73%endif
74
75%install
76rm -rf $RPM_BUILD_ROOT
77%if %{with python2}
18f31992 78%py_install
f65af884
ER
79
80rm -r $RPM_BUILD_ROOT%{py_sitescriptdir}/enum/{LICENSE,README,doc}
81rm -r $RPM_BUILD_ROOT%{py_sitescriptdir}/enum/test_*.py*
82
83%py_postclean
84%endif
85
86%if %{with python3}
18f31992 87%py3_install
f65af884
ER
88
89rm -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/enum/{LICENSE,README,doc}
90rm $RPM_BUILD_ROOT%{py3_sitescriptdir}/enum/test_enum.py
91%endif
92
93
94%clean
95rm -rf $RPM_BUILD_ROOT
96
97%if %{with python2}
98%files
99%defattr(644,root,root,755)
100%doc PKG-INFO enum/LICENSE enum/README enum/doc/enum.rst
101%dir %{py_sitescriptdir}/enum
102%{py_sitescriptdir}/enum/*.py[co]
103%{py_sitescriptdir}/enum34-%{version}-py*.egg-info
104%endif
105
106%if %{with python3}
107%files -n python3-enum34
108%defattr(644,root,root,755)
109%doc PKG-INFO enum/LICENSE enum/README enum/doc/enum.rst
110%{py3_sitescriptdir}/enum/*.py
111%{py3_sitescriptdir}/enum/__pycache__
112%{py3_sitescriptdir}/enum34-%{version}-py*.egg-info
113%endif
This page took 0.090553 seconds and 4 git commands to generate.