File python-taskflow.spec of Package python-taskflow

#
# spec file for package python-taskflow
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%global pypi_name taskflow
%if 0%{?rhel} || 0%{?fedora}
%global rdo 1
%endif
Name:           python-taskflow
Version:        3.2.0
Release:        0
Summary:        Taskflow structured state management library
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/taskflow
Source0:        https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python2-PyMySQL
BuildRequires:  python2-SQLAlchemy
BuildRequires:  python2-SQLAlchemy-Utils
BuildRequires:  python2-alembic
BuildRequires:  python2-automaton >= 1.9.0
BuildRequires:  python2-cachetools >= 2.0.0
BuildRequires:  python2-contextlib2 >= 0.4.0
BuildRequires:  python2-eventlet
BuildRequires:  python2-fasteners >= 0.7.0
BuildRequires:  python2-futurist >= 1.2.0
BuildRequires:  python2-jsonschema >= 2.6.0
BuildRequires:  python2-kazoo
BuildRequires:  python2-kombu
BuildRequires:  python2-mock
BuildRequires:  python2-networkx >= 1.10
BuildRequires:  python2-oslo.serialization >= 2.18.0
BuildRequires:  python2-oslo.utils >= 3.33.0
BuildRequires:  python2-oslotest
BuildRequires:  python2-pbr >= 2.0.0
BuildRequires:  python2-psycopg2
BuildRequires:  python2-pydot
BuildRequires:  python2-pydotplus
BuildRequires:  python2-redis
BuildRequires:  python2-retrying
BuildRequires:  python2-stevedore >= 1.20.0
BuildRequires:  python2-tenacity >= 4.4.0
BuildRequires:  python2-testrepository
BuildRequires:  python2-testscenarios
BuildRequires:  python2-testtools
BuildRequires:  python2-zake
BuildRequires:  python3-PyMySQL
BuildRequires:  python3-SQLAlchemy
BuildRequires:  python3-SQLAlchemy-Utils
BuildRequires:  python3-alembic
BuildRequires:  python3-automaton >= 1.9.0
BuildRequires:  python3-cachetools >= 2.0.0
BuildRequires:  python3-contextlib2 >= 0.4.0
BuildRequires:  python3-devel
BuildRequires:  python3-eventlet
BuildRequires:  python3-fasteners >= 0.7.0
BuildRequires:  python3-futurist >= 1.2.0
BuildRequires:  python3-jsonschema >= 2.6.0
BuildRequires:  python3-kazoo
BuildRequires:  python3-kombu
BuildRequires:  python3-mock
BuildRequires:  python3-networkx >= 1.10
BuildRequires:  python3-oslo.serialization >= 2.18.0
BuildRequires:  python3-oslo.utils >= 3.33.0
BuildRequires:  python3-oslotest
BuildRequires:  python3-pbr >= 2.0.0
BuildRequires:  python3-psycopg2
BuildRequires:  python3-pydot
BuildRequires:  python3-pydotplus
BuildRequires:  python3-redis
BuildRequires:  python3-retrying
BuildRequires:  python3-stevedore >= 1.20.0
BuildRequires:  python3-tenacity >= 4.4.0
BuildRequires:  python3-testrepository
BuildRequires:  python3-testscenarios
BuildRequires:  python3-testtools
BuildRequires:  python3-zake
Requires:       python-automaton >= 1.9.0
Requires:       python-cachetools >= 2.0.0
Requires:       python-contextlib2 >= 0.4.0
Requires:       python-debtcollector >= 1.2.0
Requires:       python-fasteners >= 0.7.0
Requires:       python-futurist >= 1.2.0
Requires:       python-jsonschema >= 2.6.0
Requires:       python-kazoo
Requires:       python-networkx >= 1.10
Requires:       python-oslo.serialization >= 2.18.0
Requires:       python-oslo.utils >= 3.33.0
Requires:       python-six >= 1.10.0
Requires:       python-stevedore >= 1.20.0
Requires:       python-tenacity >= 4.4.0
BuildArch:      noarch
%ifpython2
BuildRequires:  python-enum34 >= 1.0.4
Requires:       python-enum34 >= 1.0.4
Requires:       python-futures >= 3.0.0
%endif
%python_subpackages

%description
A library to do [jobs, tasks, flows] in a HA manner using
different backends to be used with OpenStack projects.

%package -n python-taskflow-doc
Summary:        Documentation for Taskflow
Group:          Documentation/HTML
BuildRequires:  python-Sphinx
BuildRequires:  python-openstackdocstheme

%description -n python-taskflow-doc
A library to do [jobs, tasks, flows] in a HA manner using
different backends to be used with OpenStack projects.
This package contains the associated documentation.

%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg

%if 0%{?rdo}
# TODO(jpena) remove once python-networking subpackaging is fixed
sed -i /networkx.drawing/d taskflow/types/graph.py
%endif

%build
%{python_build}

%install
%{python_install}

# generate html docs
%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

%if ! 0%{?rdo}
%check
%{python_expand rm -rf .testrepository
PYTHONPATH=. $python setup.py testr
}
%endif

%files %{python_files}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-*.egg-info

%files -n python-taskflow-doc
%license LICENSE
%doc doc/build/html

%changelog
openSUSE Build Service is sponsored by