Blob Blame History Raw
%global pypi_name aenum
%global gittag 1f140aa1b640

Name:           python-%{pypi_name}
Version:        2.1.3
Release:        1%{?dist}
Summary:        Advanced Enumerations, NamedTuples and NamedConstants for Python

License:        BSD
URL:            https://bitbucket.org/stoneleaf/aenum
# PyPI was not updated with 2.1.3
# https://bitbucket.org/stoneleaf/aenum/issues/23
#Source0:        %{pypi_source}
Source0:        https://bitbucket.org/stoneleaf/aenum/get/%{gittag}.tar.gz#/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

%description
aenum includes a Python stdlib Enum-compatible data type, as well as a
metaclass-based NamedTuple implementation and a NamedConstant class.

An Enum 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. Support exists for unique values,
multiple values, auto-numbering, and suspension of aliasing, plus the ability
to have values automatically bound to attributes.

A NamedTuple is a class-based, fixed-length tuple with a name for each
possible position accessible using attribute-access notation as well as
the standard index notation.

A NamedConstant is a class whose members cannot be rebound; it lacks all other
Enum capabilities, however.

%package -n python3-%{pypi_name}
Summary:        %{summary}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
aenum includes a Python stdlib Enum-compatible data type, as well as a
metaclass-based NamedTuple implementation and a NamedConstant class.

An Enum 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. Support exists for unique values,
multiple values, auto-numbering, and suspension of aliasing, plus the ability
to have values automatically bound to attributes.

A NamedTuple is a class-based, fixed-length tuple with a name for each
possible position accessible using attribute-access notation as well as
the standard index notation.

A NamedConstant is a class whose members cannot be rebound; it lacks all other
Enum capabilities, however.

%prep
%autosetup -n stoneleaf-%{pypi_name}-%{gittag}

%build
%py3_build

%install
%py3_install

%check
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} %{pypi_name}/test.py

%files -n python3-%{pypi_name}
%doc README aenum/doc aenum/CHANGES
%license aenum/LICENSE
%{python3_sitelib}/*.egg-info
%{python3_sitelib}/%{pypi_name}/

%changelog
* Sat Jun 08 2019 Fabian Affolter <mail@fabian-affolter.ch> - 2.1.3-1
- Update to latest upstream release 2.1.3
- Add license and docs (rhbz#1714003)

* Sat May 25 2019 Fabian Affolter <mail@fabian-affolter.ch> - 2.1.2-1
- Initial package for Fedora