Merge "python-openstackclient: convert to python3"
This commit is contained in:
commit
d35d9463d5
@ -12,39 +12,47 @@ Group: Development/Languages/Python
|
||||
URL: https://launchpad.net/{{ pypi_name }}
|
||||
Source0: {{ source }}
|
||||
BuildRequires: openstack-macros
|
||||
BuildRequires: {{ py2pkg('devel', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('python-cinderclient', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('cliff', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('fixtures', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('python-glanceclient', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('python-keystoneclient', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('mock', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('python-novaclient', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('openstacksdk', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('os-client-config', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('osc-lib', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('oslotest', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('osprofiler', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('requests', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('requests-mock', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('stestr', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('stevedore', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('testtools', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('wrapt', py_versions=['py2', 'py3']) }}
|
||||
Requires: {{ py2pkg('Babel') }}
|
||||
Requires: {{ py2pkg('python-cinderclient') }}
|
||||
Requires: {{ py2pkg('cliff') }}
|
||||
Requires: {{ py2pkg('python-glanceclient') }}
|
||||
Requires: {{ py2pkg('python-heatclient') }}
|
||||
Requires: {{ py2pkg('keystoneauth1') }}
|
||||
Requires: {{ py2pkg('python-keystoneclient') }}
|
||||
Requires: {{ py2pkg('python-novaclient') }}
|
||||
Requires: {{ py2pkg('openstacksdk') }}
|
||||
Requires: {{ py2pkg('osc-lib') }}
|
||||
Requires: {{ py2pkg('oslo.i18n') }}
|
||||
Requires: {{ py2pkg('oslo.utils') }}
|
||||
Requires: {{ py2pkg('six') }}
|
||||
BuildRequires: {{ py3('python-cinderclient') }}
|
||||
BuildRequires: {{ py3('cliff') }}
|
||||
BuildRequires: {{ py3('devel') }}
|
||||
BuildRequires: {{ py3('fixtures') }}
|
||||
BuildRequires: {{ py3('python-glanceclient') }}
|
||||
BuildRequires: {{ py3('python-keystoneclient') }}
|
||||
BuildRequires: {{ py3('mock') }}
|
||||
BuildRequires: {{ py3('python-novaclient') }}
|
||||
BuildRequires: {{ py3('openstacksdk') }}
|
||||
BuildRequires: {{ py3('os-client-config') }}
|
||||
BuildRequires: {{ py3('osc-lib') }}
|
||||
BuildRequires: {{ py3('oslotest') }}
|
||||
BuildRequires: {{ py3('osprofiler') }}
|
||||
BuildRequires: {{ py3('requests') }}
|
||||
BuildRequires: {{ py3('requests-mock') }}
|
||||
BuildRequires: {{ py3('stestr') }}
|
||||
BuildRequires: {{ py3('stevedore') }}
|
||||
BuildRequires: {{ py3('testtools') }}
|
||||
BuildRequires: {{ py3('wrapt') }}
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
python-openstackclient is a unified command-line client for the OpenStack APIs.
|
||||
It is a thin wrapper to the stock python-*client modules that implement the
|
||||
actual REST API client actions.
|
||||
|
||||
%package -n python3-openstackclient
|
||||
Summary: OpenStack Command-line Client
|
||||
Requires: {{ py3('Babel') }}
|
||||
Requires: {{ py3('python-cinderclient') }}
|
||||
Requires: {{ py3('cliff') }}
|
||||
Requires: {{ py3('python-glanceclient') }}
|
||||
Requires: {{ py3('python-heatclient') }}
|
||||
Requires: {{ py3('keystoneauth1') }}
|
||||
Requires: {{ py3('python-keystoneclient') }}
|
||||
Requires: {{ py3('python-novaclient') }}
|
||||
Requires: {{ py3('openstacksdk') }}
|
||||
Requires: {{ py3('osc-lib') }}
|
||||
Requires: {{ py3('oslo.i18n') }}
|
||||
Requires: {{ py3('oslo.utils') }}
|
||||
Requires: {{ py3('six') }}
|
||||
%if 0%{?suse_version}
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
@ -53,33 +61,34 @@ Requires(postun): update-alternatives
|
||||
Requires(post): chkconfig
|
||||
Requires(postun): chkconfig
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
%description -n python3-openstackclient
|
||||
python-openstackclient is a unified command-line client for the OpenStack APIs.
|
||||
It is a thin wrapper to the stock python-*client modules that implement the
|
||||
actual REST API client actions.
|
||||
|
||||
This package contains the Python 3.x module.
|
||||
|
||||
%package -n python-openstackclient-doc
|
||||
Summary: Documentation for OpenStack Command-line Client
|
||||
Group: Documentation/HTML
|
||||
# Some clients are commented out, since they have not been built yet
|
||||
# TODO(jpena): uncomment them to enable their sections in the documentation
|
||||
BuildRequires: {{ py2pkg('Sphinx') }}
|
||||
#BuildRequires: {{ py2pkg('aodhclient') }}
|
||||
#BuildRequires: {{ py2pkg('python-barbicanclient') }}
|
||||
#BuildRequires: {{ py2pkg('python-congressclient') }}
|
||||
#BuildRequires: {{ py2pkg('python-designateclient') }}
|
||||
#BuildRequires: {{ py2pkg('python-heatclient') }}
|
||||
#BuildRequires: {{ py2pkg('python-ironicclient') }}
|
||||
#BuildRequires: {{ py2pkg('python-mistralclient') }}
|
||||
#BuildRequires: {{ py2pkg('python-muranoclient') }}
|
||||
#BuildRequires: {{ py2pkg('python-neutronclient') }}
|
||||
BuildRequires: {{ py2pkg('openstackdocstheme') }}
|
||||
#BuildRequires: {{ py2pkg('python-ironic-inspector-client') }}
|
||||
#BuildRequires: {{ py2pkg('python-saharaclient') }}
|
||||
#BuildRequires: {{ py2pkg('python-zaqarclient') }}
|
||||
BuildRequires: {{ py2pkg('sphinxcontrib-apidoc') }}
|
||||
BuildRequires: {{ py3('Sphinx') }}
|
||||
#BuildRequires: {{ py3('aodhclient') }}
|
||||
#BuildRequires: {{ py3('python-barbicanclient') }}
|
||||
#BuildRequires: {{ py3('python-congressclient') }}
|
||||
#BuildRequires: {{ py3('python-designateclient') }}
|
||||
#BuildRequires: {{ py3('python-heatclient') }}
|
||||
#BuildRequires: {{ py3('python-ironicclient') }}
|
||||
#BuildRequires: {{ py3('python-mistralclient') }}
|
||||
#BuildRequires: {{ py3('python-muranoclient') }}
|
||||
#BuildRequires: {{ py3('python-neutronclient') }}
|
||||
BuildRequires: {{ py3('openstackdocstheme') }}
|
||||
#BuildRequires: {{ py3('python-ironic-inspector-client') }}
|
||||
#BuildRequires: {{ py3('python-saharaclient') }}
|
||||
#BuildRequires: {{ py3('python-zaqarclient') }}
|
||||
BuildRequires: {{ py3('sphinxcontrib-apidoc') }}
|
||||
|
||||
%description -n python-openstackclient-doc
|
||||
python-openstackclient is a unified command-line client for the OpenStack APIs.
|
||||
@ -92,15 +101,15 @@ This package contains auto-generated documentation.
|
||||
%py_req_cleanup
|
||||
|
||||
%build
|
||||
%{python_build}
|
||||
%{py3_build}
|
||||
|
||||
PBR_VERSION={{ upstream_version }} sphinx-build -b html doc/source doc/build/html
|
||||
PBR_VERSION={{ upstream_version }} sphinx-build -b man doc/source doc/build/man
|
||||
PBR_VERSION={{ upstream_version }} %sphinx_build -b html doc/source doc/build/html
|
||||
PBR_VERSION={{ upstream_version }} %sphinx_build -b man doc/source doc/build/man
|
||||
# remove the sphinx-build leftovers
|
||||
rm -rf doc/build/html/.{doctrees,buildinfo}
|
||||
|
||||
%install
|
||||
%{python_install}
|
||||
%{py3_install}
|
||||
# man page
|
||||
install -p -D -m 644 doc/build/man/openstack.1 %{buildroot}%{_mandir}/man1/openstack.1
|
||||
%python_clone -a %{buildroot}%{_bindir}/openstack
|
||||
@ -112,17 +121,16 @@ install -p -D -m 644 doc/build/man/openstack.1 %{buildroot}%{_mandir}/man1/opens
|
||||
%postun
|
||||
%python_uninstall_alternative openstack
|
||||
|
||||
|
||||
%check
|
||||
%python_exec -m stestr.cli run
|
||||
python3 -m stestr.cli run
|
||||
|
||||
%files %{python_files}
|
||||
%files -n python3-openstackclient
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python_sitelib}/openstackclient
|
||||
%{python_sitelib}/*.egg-info
|
||||
%python_alternative %{_bindir}/openstack
|
||||
%python_alternative %{_mandir}/man1/openstack.1
|
||||
%{python3_sitelib}/openstackclient
|
||||
%{python3_sitelib}/*.egg-info
|
||||
%python_alternative %{_bindir}/openstack*
|
||||
%python_alternative %{_mandir}/man1/openstack*.1
|
||||
|
||||
%files -n python-openstackclient-doc
|
||||
%license LICENSE
|
||||
|
Loading…
Reference in New Issue
Block a user