LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File python-enum34.spec of Package python-enum34 (Project home:lenovo-lico:lico-dep:5.1:el6)

%{!?_licensedir:%global license %%doc}
%global pypi_name enum34

Name:           python-%{pypi_name}
Version:        1.1.6
Release:        2%{?dist}
Summary:        Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2

License:        BSD License
URL:            https://bitbucket.org/stoneleaf/enum34
Source0:        https://pypi.io/packages/source/e/enum34/enum34-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires:  epel-rpm-macros
BuildRequires:  python2-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.

%package -n     python2-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}

%description -n python2-%{pypi_name}
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     python27-%{pypi_name}
Summary:        %{summary}

BuildRequires:  python27-devel
BuildRequires:  python27-setuptools

%description -n python27-%{pypi_name}
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
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py27_build
%py2_build

%install
%py27_install
%py2_install


%files -n python2-%{pypi_name}
%license enum/LICENSE
%{python2_sitelib}/enum
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

%files -n python27-%{pypi_name}
%license enum/LICENSE
%{python27_sitelib}/enum
%{python27_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

%changelog
* Fri Dec 29 2017 Yunfei Shi <shiyf2@lenovo.com> - 1.1.6-2
- Add python27-enum34 for python2.7 on el6.

* Fri Dec 22 2017 Yunfei Shi <shiyf2@lenovo.com> - 1.1.6-1
- Initial package.