Blame python-automaton.spec

a3be369
# Macros for py2/py3 compatibility
393bb3c
%if 0%{?fedora} || 0%{?rhel} > 7
a3be369
%global pyver %{python3_pkgversion}
393bb3c
%else
a3be369
%global pyver 2
42f9434
%endif
a3be369
%global pyver_bin python%{pyver}
a3be369
%global pyver_sitelib %python%{pyver}_sitelib
a3be369
%global pyver_install %py%{pyver}_install
a3be369
%global pyver_build %py%{pyver}_build
a3be369
# End of macros for py2/py3 compatibility
a3be369
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
a3be369
%global pypi_name automaton
a3be369
a3be369
%global with_doc 1
42f9434
42f9434
Name:           python-%{pypi_name}
a3be369
Version:        1.16.0
9deb0b3
Release:        2%{?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
a3be369
%package -n python%{pyver}-%{pypi_name}
42f9434
Summary:        Friendly state machines for python
a3be369
%{?python_provide:%python_provide python%{pyver}-%{pypi_name}}
a3be369
BuildRequires:  python%{pyver}-devel
a3be369
BuildRequires:  python%{pyver}-pbr
a3be369
BuildRequires:  git
a3be369
BuildRequires:  python%{pyver}-prettytable
42f9434
a3be369
Requires: python%{pyver}-pbr >= 2.0.0
a3be369
Requires: python%{pyver}-six >= 1.10.0
a3be369
Requires: python%{pyver}-prettytable
a3be369
a3be369
%description -n python%{pyver}-%{pypi_name}
42f9434
Friendly state machines for python.
42f9434
a3be369
%if 0%{?with_doc}
d81e912
%package -n python-%{pypi_name}-doc
d81e912
Summary:        Friendly state machines for python - documentation
a3be369
BuildRequires:  graphviz
a3be369
BuildRequires:  python%{pyver}-sphinx
a3be369
BuildRequires:  python%{pyver}-openstackdocstheme
d81e912
d81e912
%description -n python-%{pypi_name}-doc
d81e912
Friendly state machines for python (documentation)
a3be369
%endif
d81e912
42f9434
%prep
8b123ae
%autosetup -n %{pypi_name}-%{upstream_version} -S git
42f9434
42f9434
%build
a3be369
%{pyver_build}
42f9434
a3be369
%if 0%{?with_doc}
a3be369
# generate html docs 
a3be369
%{pyver_bin} setup.py build_sphinx -b html
a3be369
# remove the sphinx-build-%{pyver} leftovers
8b123ae
rm -rf doc/build/html/.{doctrees,buildinfo}
393bb3c
%endif
42f9434
a3be369
%install
a3be369
%{pyver_install}
42f9434
a3be369
%files -n python%{pyver}-%{pypi_name}
8b123ae
%doc README.rst
42f9434
%license LICENSE
a3be369
%{pyver_sitelib}/%{pypi_name}
a3be369
%{pyver_sitelib}/*.egg-info
42f9434
a3be369
%if 0%{?with_doc}
d81e912
%files -n python-%{pypi_name}-doc
8b123ae
%doc doc/build/html
d81e912
%license LICENSE
a3be369
%endif
600e984
d81e912
%changelog
9deb0b3
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.0-2
9deb0b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
9deb0b3
a3be369
* Tue Mar 12 2019 RDO <dev@lists.rdoproject.org> 1.16.0-1
a3be369
- Update to 1.16.0
6e0f45f