d81e912
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
d81e912
%global pypi_name automaton
d81e912
42f9434
%if 0%{?fedora}
42f9434
%global with_python3 1
42f9434
%endif
42f9434
42f9434
Name:           python-%{pypi_name}
d576a0b
Version:        1.5.0
50a66f4
Release:        4%{?dist}
42f9434
Summary:        Friendly state machines for python
42f9434
42f9434
License:        ASL 2.0
42f9434
URL:            https://wiki.openstack.org/wiki/Oslo#automaton
a910e45
Source0:        https://pypi.io/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
42f9434
BuildArch:      noarch
d81e912
42f9434
%description
42f9434
Friendly state machines for python.
42f9434
42f9434
%package -n python2-%{pypi_name}
42f9434
Summary:        Friendly state machines for python
42f9434
%{?python_provide:%python_provide python2-%{pypi_name}}
42f9434
BuildRequires:  python2-devel
42f9434
BuildRequires:  python-pbr
42f9434
BuildRequires:  python-sphinx
42f9434
BuildRequires:  python-oslo-sphinx
42f9434
42f9434
Requires: python-pbr >= 1.6
42f9434
Requires: python-six >= 1.9.0
d81e912
Requires: python-debtcollector >= 1.2.0
42f9434
Requires: python-prettytable
42f9434
42f9434
%description -n python2-%{pypi_name}
42f9434
Friendly state machines for python.
42f9434
42f9434
%if 0%{?with_python3}
42f9434
%package -n python3-%{pypi_name}
42f9434
Summary:        Friendly state machines for python
42f9434
%{?python_provide:%python_provide python3-%{pypi_name}}
42f9434
BuildRequires:  python3-devel
42f9434
BuildRequires:  python3-pbr
42f9434
BuildRequires:  python3-sphinx
42f9434
BuildRequires:  python3-oslo-sphinx
42f9434
42f9434
Requires: python3-pbr >= 1.6
42f9434
Requires: python3-six >= 1.9.0
d81e912
Requires: python3-debtcollector >= 1.2.0
42f9434
Requires: python3-prettytable
42f9434
42f9434
%description -n python3-%{pypi_name}
42f9434
Friendly state machines for python.
42f9434
%endif
42f9434
d81e912
%package -n python-%{pypi_name}-doc
d81e912
Summary:        Friendly state machines for python - documentation
d81e912
d81e912
%description -n python-%{pypi_name}-doc
d81e912
Friendly state machines for python (documentation)
d81e912
42f9434
%prep
d81e912
%setup -q -n %{pypi_name}-%{upstream_version}
42f9434
42f9434
%build
42f9434
%if 0%{?with_python3}
d81e912
%py3_build
42f9434
%endif
d81e912
%py2_build
42f9434
42f9434
# generate html docs 
42f9434
sphinx-build doc/source html
42f9434
# remove the sphinx-build leftovers
42f9434
rm -rf html/.{doctrees,buildinfo}
42f9434
d81e912
%install
42f9434
%if 0%{?with_python3}
d81e912
%py3_install
42f9434
%endif
d81e912
%py2_install
42f9434
42f9434
%files -n python2-%{pypi_name}
d81e912
%doc html README.rst
42f9434
%license LICENSE
42f9434
%{python2_sitelib}/%{pypi_name}
42f9434
%{python2_sitelib}/*.egg-info
42f9434
42f9434
%if 0%{?with_python3}
42f9434
%files -n python3-%{pypi_name}
42f9434
%doc html README.rst
42f9434
%license LICENSE
42f9434
%{python3_sitelib}/%{pypi_name}
42f9434
%{python3_sitelib}/*.egg-info
42f9434
%endif
42f9434
d81e912
%files -n python-%{pypi_name}-doc
d81e912
%doc html
d81e912
%license LICENSE
600e984
d81e912
%changelog
50a66f4
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-4
50a66f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
50a66f4
8dcc2d2
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-3
8dcc2d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8dcc2d2
aa7ccfe
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.5.0-2
aa7ccfe
- Rebuild for Python 3.6
aa7ccfe
d576a0b
* Fri Oct 21 2016 Javier Peña <jpena@redhat.com> - 1.5.0-1
d576a0b
- Updated to upstream version 1.5.0
d576a0b
d81e912
* Fri Sep 09 2016 Haikel Guemar <hguemar@fedoraproject.org> 1.4.0-2
d81e912
- Add python3 subpackages
d81e912
- Sync w/ RDO Newton
6e0f45f