74 lines
1.9 KiB
Django/Jinja
74 lines
1.9 KiB
Django/Jinja
{% set pypi_name = 'automaton' %}
|
|
{% set upstream_version = upstream_version('3.2.0') %}
|
|
{% set rpm_release = '1' %}
|
|
{% set source = url_pypi() %}
|
|
|
|
Name: {{ py2name() }}
|
|
Version: {{ py2rpmversion() }}
|
|
Release: {{ py2rpmrelease() }}
|
|
Summary: Friendly state machines for python
|
|
License: {{ license('Apache-2.0') }}
|
|
Group: Development/Languages/Python
|
|
URL: https://docs.openstack.org/{{ pypi_name }}
|
|
Source0: {{ source }}
|
|
BuildRequires: openstack-macros
|
|
BuildRequires: {{ py3('PrettyTable') }}
|
|
BuildRequires: {{ py3('devel') }}
|
|
BuildRequires: {{ py3('oslotest') }}
|
|
BuildRequires: {{ py3('pbr') }}
|
|
BuildRequires: {{ py3('stestr') }}
|
|
BuildRequires: {{ py3('testtools') }}
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Friendly state machines for python.
|
|
|
|
%package -n {{ py2name(py_versions='py3') }}
|
|
Summary: Friendly state machines for python
|
|
Requires: {{ py3('PrettyTable') }}
|
|
Requires: {{ py3('pbr') }}
|
|
Requires: {{ py3('six') }}
|
|
|
|
%description -n {{ py2name(py_versions='py3') }}
|
|
Friendly state machines for python.
|
|
|
|
This package contains the Python 3.x module.
|
|
|
|
%package -n python-automaton-doc
|
|
Summary: Documentation for the Automaton Library
|
|
BuildRequires: {{ py3('Sphinx') }}
|
|
BuildRequires: {{ py3('openstackdocstheme') }}
|
|
|
|
%description -n python-automaton-doc
|
|
Documentation for the Automaton library.
|
|
|
|
%prep
|
|
%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }}
|
|
%py_req_cleanup
|
|
|
|
%build
|
|
%{py3_build}
|
|
|
|
# generate html docs
|
|
PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html
|
|
# remove the Sphinx-build leftovers
|
|
rm -rf doc/build/html/.{doctrees,buildinfo}
|
|
|
|
%install
|
|
%{py3_install}
|
|
|
|
%check
|
|
%{openstack_stestr_run}
|
|
|
|
%files -n {{ py2name(py_versions='py3') }}
|
|
%doc README.rst
|
|
%license LICENSE
|
|
%{python3_sitelib}/automaton
|
|
%{python3_sitelib}/*.egg-info
|
|
|
|
%files -n python-automaton-doc
|
|
%license LICENSE
|
|
%doc doc/build/html
|
|
|
|
%changelog
|