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:el7)

# Created by pyp2rpm-3.2.3
%global pypi_name enum34

Name:           python-%{pypi_name}
Version:        1.1.6
Release:        1%{?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:  python2-devel
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.

%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py2_build

%install
%py2_install

%files -n python2-%{pypi_name}
%{!?_licensedir:%global license %%doc}
%license enum/LICENSE
%{python2_sitelib}/enum
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info

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