[packages/python-enum34] new, version 1.0.4

glen glen at pld-linux.org
Wed Apr 15 20:04:46 CEST 2015


commit f65af8847e3f83f2afd39f29841e2b133f4e0c53
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Apr 15 17:58:49 2015 +0300

    new, version 1.0.4
    
    based on fedora package, 7d94a6b

 python-enum34.spec | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 121 insertions(+)
---
diff --git a/python-enum34.spec b/python-enum34.spec
new file mode 100644
index 0000000..9cbd8c2
--- /dev/null
+++ b/python-enum34.spec
@@ -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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-enum34.git/commitdiff/f65af8847e3f83f2afd39f29841e2b133f4e0c53



More information about the pld-cvs-commit mailing list