%if 0%{?rhel} && 0%{?rhel} <= 7 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %if 0%{?fedora} > 12 || 0%{?rhel} > 7 # Should not build for Python 3 for Fedora releases that provide # Python 3.4 (Fedora 22 or higher?). %endif Name: python-enum34 Version: 1.1.6 Release: 2%{?dist} Group: Development/Libraries Summary: Backport of Python 3.4 Enum License: BSD BuildArch: noarch URL: https://pypi.python.org/pypi/enum34 Source0: https://files.pythonhosted.org/packages/source/e/enum34/enum34-%{version}.tar.gz BuildRequires: python2-devel python-setuptools %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. %prep %setup -q -n enum34-%{version} %build %py2_build %check pushd %{buildroot}/%{python2_sitelib} PYTHONPATH=".:${PYTHONPATH}" %{__python2} enum/test.py popd %install %py2_install # remove docs from sitelib, we'll put them in doc dir instead rm -rf %{buildroot}%{python2_sitelib}/enum/{LICENSE,README,doc} %files %doc PKG-INFO enum/LICENSE enum/README enum/doc/enum.rst %{python2_sitelib}/* %changelog * Thu Jul 27 2017 Fedora Release Engineering - 1.1.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Thu Jun 15 2017 Eric Smith 1.1.6-1 - New upstream version 1.1.6 (#1441428) - Update upstream tarball dir - Convert to newer build marcos - Update tests to pass in new build - These RPM spec changes were all provided by Greg Hellings. * Sat Feb 11 2017 Fedora Release Engineering - 1.0.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Jul 19 2016 Fedora Release Engineering - 1.0.4-6 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Wed Feb 24 2016 Robert Kuska - 1.0.4-5 - Remove python3 subpackage, enum34 is now provided by python3 * Thu Feb 04 2016 Fedora Release Engineering - 1.0.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - 1.0.4-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 1.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Wed Apr 08 2015 Eric Smith 1.0.4-1 - Updated to latest upstream. * Mon Jul 21 2014 Matěj Cepl - 1.0-4 - No, we don’t have python3 in RHEL-7 :'( * Sat Jun 07 2014 Fedora Release Engineering - 1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 28 2014 Kalev Lember - 1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 * Mon May 26 2014 Eric Smith 1.0-1 - Updated to latest upstream. * Mon Mar 17 2014 Eric Smith 0.9.23-1 - Updated to latest upstream. - Spec updated per review comments (#1033975). * Sun Nov 24 2013 Eric Smith 0.9.19-1 - Initial version.