Blob Blame Raw
# Created by pyp2rpm-3.3.0
%global pypi_name Automat

%global common_description %{expand:
Automat is a library for concise, idiomatic Python expression of finite-state 
automata (particularly deterministic finite-state transducers).}

Name:           python-%{pypi_name}
Version:        0.6.0
Release:        2%{?dist}
Summary:        Self-service finite-state machines for the programmer on the go

License:        MIT
URL:            https://github.com/glyph/Automat
Source0:        https://files.pythonhosted.org/packages/source/A/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch
 
%{?python_enable_dependency_generator}
 
%description
Automat is a library for concise, idiomatic Python expression of finite-state 
automata (particularly deterministic finite-state transducers).


%package -n     python2-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
 
BuildRequires:  python2-devel
BuildRequires:  python2dist(attrs)
BuildRequires:  python2dist(graphviz) > 0.5.1
BuildRequires:  python2dist(m2r)
BuildRequires:  python2dist(setuptools)
BuildRequires:  python2dist(setuptools-scm)
BuildRequires:  python2dist(six)
BuildRequires:  python2dist(twisted) >= 16.1.1

%description -n python2-%{pypi_name}
%{common_description}


%package -n     python3-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
 
BuildRequires:  python3-devel
BuildRequires:  python3dist(attrs)
BuildRequires:  python3dist(graphviz) > 0.5.1
BuildRequires:  python3dist(m2r)
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
BuildRequires:  python3dist(six)
BuildRequires:  python3dist(twisted) >= 16.1.1

%description -n python3-%{pypi_name}
%{common_description}


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


%build
%py2_build
%py3_build


%install
# Must do the default python version install last because
# the scripts in /usr/bin are overwritten with every setup.py install.
%py2_install
rm -rf %{buildroot}%{_bindir}/*
%py3_install


%check
%{__python2} setup.py test
%{__python3} setup.py test


%files -n python2-%{pypi_name}
%license LICENSE
%doc README.md
%{python2_sitelib}/automat
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info


%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{_bindir}/automat-visualize
%{python3_sitelib}/automat
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info


%changelog
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-2
- Rebuilt for Python 3.7

* Fri Apr 13 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.6.0-1
- Initial package.