mistral: Move to python3

- Rename files to openstack-mistral-XXX instead of mistral-XXX to be
  consistent with other projects
- cleanup BuildRequires a bit.

Change-Id: I383e25d931d7bee292e521e04e55af70d935b72a
This commit is contained in:
Ralf Haferkamp 2019-09-10 13:09:36 +02:00 committed by Dirk Mueller
parent 38a0bc32b7
commit feef7b69dd
5 changed files with 124 additions and 142 deletions

View File

@ -1,6 +1,6 @@
{% set pypi_name = 'mistral' %}
{% set upstream_version = upstream_version('8.0.0') %}
{% set source = url_pypi() %}
{% set source = fetch_source('https://tarballs.openstack.org/mistral/mistral-master.tar.gz') %}
{% set upstream_version = upstream_version() %}
{% set rpm_release = '1' %}
%if 0%{?rhel} || 0%{?fedora}
%global rdo 1
@ -12,69 +12,62 @@ Summary: Workflow Service for OpenStack cloud
License: {{ license('Apache-2.0') }}
Group: Development/Libraries
URL: https://launchpad.net/mistral
Source0: {{ source }}
Source1: mistral-api.service
Source2: mistral-engine.service
Source3: mistral-executor.service
Source7: mistral.tmpfiles
Source0: {{ source | basename}}
Source1: openstack-mistral-api.service
Source2: openstack-mistral-engine.service
Source3: openstack-mistral-executor.service
Source7: openstack-mistral.tmpfiles
BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('PyJWT') }}
BuildRequires: {{ py2pkg('aodhclient') }}
BuildRequires: {{ py2pkg('python-barbicanclient') }}
BuildRequires: {{ py2pkg('python-cinderclient') }}
BuildRequires: {{ py2pkg('croniter') }}
BuildRequires: {{ py2pkg('python-designateclient') }}
BuildRequires: {{ py2pkg('fixtures') }}
BuildRequires: {{ py2pkg('python-glanceclient') }}
BuildRequires: {{ py2pkg('python-glareclient') }}
BuildRequires: {{ py2pkg('gnocchiclient') }}
BuildRequires: {{ py2pkg('python-heatclient') }}
BuildRequires: {{ py2pkg('python-ironic-inspector-client') }}
BuildRequires: {{ py2pkg('python-ironicclient') }}
BuildRequires: {{ py2pkg('kazoo') }}
BuildRequires: {{ py2pkg('python-keystoneclient') }}
BuildRequires: {{ py2pkg('keystonemiddleware') }}
BuildRequires: {{ py2pkg('python-magnumclient') }}
BuildRequires: {{ py2pkg('python-manilaclient') }}
BuildRequires: {{ py2pkg('mistral-lib') }}
BuildRequires: {{ py2pkg('python-mistralclient') }}
BuildRequires: {{ py2pkg('python-muranoclient') }}
BuildRequires: {{ py2pkg('python-neutronclient') }}
BuildRequires: {{ py2pkg('nose') }}
BuildRequires: {{ py2pkg('python-novaclient') }}
BuildRequires: {{ py2pkg('os-api-ref') }}
BuildRequires: {{ py2pkg('oslo.concurrency') }}
BuildRequires: {{ py2pkg('oslo.config') }}
BuildRequires: {{ py2pkg('oslo.db') }}
BuildRequires: {{ py2pkg('oslo.i18n') }}
BuildRequires: {{ py2pkg('oslo.log') }}
BuildRequires: {{ py2pkg('oslo.messaging') }}
BuildRequires: {{ py2pkg('oslo.middleware') }}
BuildRequires: {{ py2pkg('oslo.policy') }}
BuildRequires: {{ py2pkg('oslo.service') }}
BuildRequires: {{ py2pkg('oslotest') }}
BuildRequires: {{ py2pkg('osprofiler') }}
BuildRequires: {{ py2pkg('pbr') }}
BuildRequires: {{ py2pkg('python-subunit') }}
BuildRequires: {{ py2pkg('python-qinlingclient') }}
BuildRequires: {{ py2pkg('reno') }}
BuildRequires: {{ py2pkg('requests-mock') }}
BuildRequires: {{ py2pkg('python-senlinclient') }}
BuildRequires: {{ py2pkg('six') }}
BuildRequires: {{ py2pkg('stestr') }}
BuildRequires: {{ py2pkg('stevedore') }}
BuildRequires: {{ py2pkg('python-swiftclient') }}
BuildRequires: {{ py2pkg('python-tackerclient') }}
BuildRequires: {{ py2pkg('testrepository') }}
BuildRequires: {{ py2pkg('testscenarios') }}
BuildRequires: {{ py2pkg('testtools') }}
BuildRequires: {{ py2pkg('tooz') }}
BuildRequires: {{ py2pkg('python-troveclient') }}
BuildRequires: {{ py2pkg('unittest2') }}
BuildRequires: {{ py2pkg('python-vitrageclient') }}
BuildRequires: {{ py2pkg('zake') }}
BuildRequires: {{ py2pkg('python-zaqarclient') }}
BuildRequires: {{ py2pkg('python-zunclient') }}
BuildRequires: {{ py3('PyJWT') }}
BuildRequires: {{ py3('aodhclient') }}
BuildRequires: {{ py3('python-barbicanclient') }}
BuildRequires: {{ py3('python-cinderclient') }}
BuildRequires: {{ py3('croniter') }}
BuildRequires: {{ py3('python-designateclient') }}
BuildRequires: {{ py3('eventlet') }}
BuildRequires: {{ py3('fixtures') }}
BuildRequires: {{ py3('python-glanceclient') }}
BuildRequires: {{ py3('python-glareclient') }}
BuildRequires: {{ py3('gnocchiclient') }}
BuildRequires: {{ py3('python-heatclient') }}
BuildRequires: {{ py3('python-ironic-inspector-client') }}
BuildRequires: {{ py3('python-ironicclient') }}
BuildRequires: {{ py3('jsonschema') }}
BuildRequires: {{ py3('kazoo') }}
BuildRequires: {{ py3('python-keystoneclient') }}
BuildRequires: {{ py3('keystonemiddleware') }}
BuildRequires: {{ py3('python-magnumclient') }}
BuildRequires: {{ py3('python-manilaclient') }}
BuildRequires: {{ py3('mistral-lib') }}
BuildRequires: {{ py3('python-muranoclient') }}
BuildRequires: {{ py3('networkx') }}
BuildRequires: {{ py3('python-neutronclient') }}
BuildRequires: {{ py3('python-novaclient') }}
BuildRequires: {{ py3('oslo.config') }}
BuildRequires: {{ py3('oslo.db') }}
BuildRequires: {{ py3('oslo.log') }}
BuildRequires: {{ py3('oslo.messaging') }}
BuildRequires: {{ py3('oslo.middleware') }}
BuildRequires: {{ py3('oslo.policy') }}
BuildRequires: {{ py3('oslotest') }}
BuildRequires: {{ py3('osprofiler') }}
BuildRequires: {{ py3('paramiko') }}
BuildRequires: {{ py3('pbr') }}
BuildRequires: {{ py3('python-qinlingclient') }}
BuildRequires: {{ py3('requests-mock') }}
BuildRequires: {{ py3('python-senlinclient') }}
BuildRequires: {{ py3('stestr') }}
BuildRequires: {{ py3('stevedore') }}
BuildRequires: {{ py3('python-swiftclient') }}
BuildRequires: {{ py3('python-tackerclient') }}
BuildRequires: {{ py3('tenacity') }}
BuildRequires: {{ py3('tooz') }}
BuildRequires: {{ py3('python-troveclient') }}
BuildRequires: {{ py3('python-vitrageclient') }}
BuildRequires: {{ py3('yaql') }}
BuildRequires: {{ py3('zake') }}
BuildRequires: {{ py3('python-zaqarclient') }}
BuildRequires: {{ py3('python-zunclient') }}
Requires: python-mistral = %{version}-%{release}
BuildArch: noarch
%if 0%{?suse_version}
@ -89,19 +82,12 @@ Python package - python-{{ pypi_name }}
%package doc
Summary: Documentation for OpenStack Workflow Service
BuildRequires: git
BuildRequires: {{ py2pkg('Tempest') }}
BuildRequires: {{ py2pkg('Sphinx') }}
BuildRequires: {{ py2pkg('WSME') }}
BuildRequires: {{ py2pkg('jsonschema') }}
BuildRequires: {{ py2pkg('networkx') }}
BuildRequires: {{ py2pkg('openstackdocstheme') }}
BuildRequires: {{ py2pkg('paramiko') }}
BuildRequires: {{ py2pkg('pecan') }}
BuildRequires: {{ py2pkg('pep8') }}
BuildRequires: {{ py2pkg('sphinxcontrib-httpdomain') }}
BuildRequires: {{ py2pkg('sphinxcontrib-pecanwsme') }}
BuildRequires: {{ py2pkg('yaql') }}
BuildRequires: {{ py3('Sphinx') }}
BuildRequires: {{ py3('WSME') }}
BuildRequires: {{ py3('openstackdocstheme') }}
BuildRequires: {{ py3('pecan') }}
BuildRequires: {{ py3('sphinxcontrib-httpdomain') }}
BuildRequires: {{ py3('sphinxcontrib-pecanwsme') }}
%description doc
OpenStack Mistral documentaion.
@ -110,65 +96,62 @@ This package contains the documentation
%package -n python-{{ pypi_name }}
Summary: Mistral Python libraries
Requires: {{ py2pkg('Babel') }}
Requires: {{ py2pkg('PyJWT') }}
Requires: {{ py2pkg('PyYAML') }}
Requires: {{ py2pkg('SQLAlchemy') }}
Requires: {{ py2pkg('WSME') }}
Requires: {{ py2pkg('alembic') }}
Requires: {{ py2pkg('python-barbicanclient') }}
Requires: {{ py2pkg('cachetools') }}
Requires: {{ py2pkg('python-cinderclient') }}
Requires: {{ py2pkg('croniter') }}
Requires: {{ py2pkg('python-designateclient') }}
Requires: {{ py2pkg('eventlet') }}
Requires: {{ py2pkg('python-glanceclient') }}
Requires: {{ py2pkg('python-glareclient') }}
Requires: {{ py2pkg('python-heatclient') }}
Requires: {{ py2pkg('python-ironic-inspector-client') }}
Requires: {{ py2pkg('python-ironicclient') }}
Requires: {{ py2pkg('jsonschema') }}
Requires: {{ py2pkg('python-keystoneclient') }}
Requires: {{ py2pkg('keystonemiddleware') }}
Requires: {{ py2pkg('python-magnumclient') }}
Requires: {{ py2pkg('python-manilaclient') }}
Requires: {{ py2pkg('mistral-lib') }}
Requires: {{ py2pkg('python-mistralclient') }}
Requires: {{ py2pkg('mock') }}
Requires: {{ py2pkg('python-muranoclient') }}
Requires: {{ py2pkg('networkx') }}
Requires: {{ py2pkg('python-neutronclient') }}
Requires: {{ py2pkg('python-novaclient') }}
Requires: {{ py2pkg('oslo.concurrency') }}
Requires: {{ py2pkg('oslo.config') }}
Requires: {{ py2pkg('oslo.db') }}
Requires: {{ py2pkg('oslo.log') }}
Requires: {{ py2pkg('oslo.messaging') }}
Requires: {{ py2pkg('oslo.middleware') }}
Requires: {{ py2pkg('oslo.policy') }}
Requires: {{ py2pkg('oslo.serialization') }}
Requires: {{ py2pkg('oslo.service') }}
Requires: {{ py2pkg('oslo.utils') }}
Requires: {{ py2pkg('osprofiler') }}
Requires: {{ py2pkg('paramiko') }}
Requires: {{ py2pkg('pbr') }}
Requires: {{ py2pkg('pecan') }}
Requires: {{ py2pkg('python-qinlingclient') }}
Requires: {{ py2pkg('requests') }}
Requires: {{ py2pkg('retrying') }}
Requires: {{ py2pkg('python-senlinclient') }}
Requires: {{ py2pkg('setuptools') }}
Requires: {{ py2pkg('six') }}
Requires: {{ py2pkg('stevedore') }}
Requires: {{ py2pkg('python-swiftclient') }}
Requires: {{ py2pkg('python-tackerclient') }}
Requires: {{ py2pkg('tooz') }}
Requires: {{ py2pkg('python-troveclient') }}
Requires: {{ py2pkg('python-vitrageclient') }}
Requires: {{ py2pkg('yaql') }}
Requires: {{ py2pkg('zake') }}
Requires: {{ py2pkg('python-zaqarclient') }}
Requires: {{ py2pkg('python-zunclient') }}
Requires: {{ py3('Babel') }}
Requires: {{ py3('PyJWT') }}
Requires: {{ py3('PyYAML') }}
Requires: {{ py3('SQLAlchemy') }}
Requires: {{ py3('WSME') }}
Requires: {{ py3('alembic') }}
Requires: {{ py3('python-barbicanclient') }}
Requires: {{ py3('cachetools') }}
Requires: {{ py3('python-cinderclient') }}
Requires: {{ py3('croniter') }}
Requires: {{ py3('python-designateclient') }}
Requires: {{ py3('eventlet') }}
Requires: {{ py3('python-glanceclient') }}
Requires: {{ py3('python-glareclient') }}
Requires: {{ py3('python-heatclient') }}
Requires: {{ py3('python-ironic-inspector-client') }}
Requires: {{ py3('python-ironicclient') }}
Requires: {{ py3('jsonschema') }}
Requires: {{ py3('python-keystoneclient') }}
Requires: {{ py3('keystonemiddleware') }}
Requires: {{ py3('python-magnumclient') }}
Requires: {{ py3('python-manilaclient') }}
Requires: {{ py3('mistral-lib') }}
Requires: {{ py3('python-mistralclient') }}
Requires: {{ py3('python-muranoclient') }}
Requires: {{ py3('networkx') }}
Requires: {{ py3('python-neutronclient') }}
Requires: {{ py3('python-novaclient') }}
Requires: {{ py3('oslo.concurrency') }}
Requires: {{ py3('oslo.config') }}
Requires: {{ py3('oslo.db') }}
Requires: {{ py3('oslo.log') }}
Requires: {{ py3('oslo.messaging') }}
Requires: {{ py3('oslo.middleware') }}
Requires: {{ py3('oslo.policy') }}
Requires: {{ py3('oslo.serialization') }}
Requires: {{ py3('oslo.service') }}
Requires: {{ py3('oslo.utils') }}
Requires: {{ py3('osprofiler') }}
Requires: {{ py3('paramiko') }}
Requires: {{ py3('pbr') }}
Requires: {{ py3('pecan') }}
Requires: {{ py3('python-qinlingclient') }}
Requires: {{ py3('requests') }}
Requires: {{ py3('python-senlinclient') }}
Requires: {{ py3('six') }}
Requires: {{ py3('stevedore') }}
Requires: {{ py3('python-swiftclient') }}
Requires: {{ py3('python-tackerclient') }}
Requires: {{ py3('tooz') }}
Requires: {{ py3('python-troveclient') }}
Requires: {{ py3('python-vitrageclient') }}
Requires: {{ py3('yaql') }}
Requires: {{ py3('zake') }}
Requires: {{ py3('python-zaqarclient') }}
Requires: {{ py3('python-zunclient') }}
%description -n python-{{ pypi_name }}
Mistral is a workflow service.
@ -216,18 +199,17 @@ which the API servers will use.
%py_req_cleanup
%build
%{py2_build}
%{py3_build}
export PYTHONPATH="."
oslo-config-generator --config-file tools/config/config-generator.mistral.conf \
--output-file etc/mistral.conf.sample
PBR_VERSION={{ upstream_version }} sphinx-build -b html doc/source doc/build/html
PBR_VERSION={{ upstream_version }} %sphinx_build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
%{py2_install}
%{py3_install}
install -d -m 755 %{buildroot}%{_sysconfdir}/mistral/
install -d -m 750 %{buildroot}%{_localstatedir}/log/mistral
@ -251,7 +233,7 @@ chmod +x %{buildroot}%{_bindir}/mistral*
%check
# we dont want hacking/pep8 tests
rm -r mistral/tests/unit/hacking/
%{__python2} -m stestr.cli run
%{__python3} -m stestr.cli run
%post
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
@ -305,6 +287,6 @@ rm -r mistral/tests/unit/hacking/
%{_unitdir}/openstack-mistral-executor.service
%files -n python-{{ pypi_name }}
%{python2_sitelib}/{{ pypi_name }}*
%{python3_sitelib}/{{ pypi_name }}*
%changelog