]> git.pld-linux.org Git - packages/python-enum34.git/commitdiff
new, version 1.0.4 auto/th/python-enum34-1.0.4-1
authorElan Ruusamäe <glen@delfi.ee>
Wed, 15 Apr 2015 14:58:49 +0000 (17:58 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 15 Apr 2015 14:58:49 +0000 (17:58 +0300)
based on fedora package, 7d94a6b

python-enum34.spec [new file with mode: 0644]

diff --git a/python-enum34.spec b/python-enum34.spec
new file mode 100644 (file)
index 0000000..9cbd8c2
--- /dev/null
@@ -0,0 +1,121 @@
+#
+# Conditional build:
+%bcond_without tests   # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_with    python3 # CPython 3.x module (not needed for Python 3.4+)
+
+Summary:       Backport of Python 3.4 Enum
+Name:          python-enum34
+Version:       1.0.4
+Release:       1
+License:       BSD
+Group:         Development/Libraries
+Source0:       https://pypi.python.org/packages/source/e/enum34/enum34-%{version}.tar.gz
+# Source0-md5: ac80f432ac9373e7d162834b264034b6
+URL:           https://pypi.python.org/pypi/enum34
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.219
+%if %{with python2}
+BuildRequires: python
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3
+BuildRequires: python3-setuptools
+%endif
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python 3.4 introduced official support for enumerations. This is a
+backport of that feature to Python 3.3, 3.2, 3.1, 2.7, 2.5, 2.5, and
+2.4.
+
+An enumeration is a set of symbolic names (members) bound to unique,
+constant values. Within an enumeration, the members can be compared by
+identity, and the enumeration itself can be iterated over.
+
+This module defines two enumeration classes that can be used to define
+unique sets of names and values: Enum and IntEnum. It also defines one
+decorator, unique, that ensures only unique member names are present
+in an enumeration.
+
+%package -n python3-enum34
+Summary:       Backport of Python 3.4 Enum
+Group:         Development/Libraries
+
+%description -n python3-enum34
+Python 3.4 introduced official support for enumerations. This is a
+backport of that feature to Python 3.3, 3.2, 3.1, 2.7, 2.5, 2.5, and
+2.4.
+
+An enumeration is a set of symbolic names (members) bound to unique,
+constant values. Within an enumeration, the members can be compared by
+identity, and the enumeration itself can be iterated over.
+
+This module defines two enumeration classes that can be used to define
+unique sets of names and values: Enum and IntEnum. It also defines one
+decorator, unique, that ensures only unique member names are present
+in an enumeration.
+
+%prep
+%setup -q -n enum34-%{version}
+
+%build
+%if %{with python2}
+%{__python} setup.py build --build-base build-2
+%{?with_tests:%{__python} enum/test_enum.py}
+%endif
+
+%if %{with python3}
+%{__python3} setup.py build --build-base build-3
+%{?with_tests:%{__python3} enum/test_enum.py}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
+%{__python} setup.py \
+       build --build-base build-2 \
+       install --skip-build \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+
+rm -r $RPM_BUILD_ROOT%{py_sitescriptdir}/enum/{LICENSE,README,doc}
+rm -r $RPM_BUILD_ROOT%{py_sitescriptdir}/enum/test_*.py*
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+       build --build-base build-3 \
+       install --skip-build \
+       --optimize=2 \
+       --root=$RPM_BUILD_ROOT
+
+rm -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/enum/{LICENSE,README,doc}
+rm $RPM_BUILD_ROOT%{py3_sitescriptdir}/enum/test_enum.py
+%endif
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc PKG-INFO enum/LICENSE enum/README enum/doc/enum.rst
+%dir %{py_sitescriptdir}/enum
+%{py_sitescriptdir}/enum/*.py[co]
+%{py_sitescriptdir}/enum34-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-enum34
+%defattr(644,root,root,755)
+%doc PKG-INFO enum/LICENSE enum/README enum/doc/enum.rst
+%{py3_sitescriptdir}/enum/*.py
+%{py3_sitescriptdir}/enum/__pycache__
+%{py3_sitescriptdir}/enum34-%{version}-py*.egg-info
+%endif
This page took 0.084889 seconds and 4 git commands to generate.