os-xenapi: switch to singlespec

Change-Id: I356d3f364adce52a624179b2c91f99454646db76
This commit is contained in:
Dirk Mueller
2019-07-11 19:39:01 +02:00
committed by Colleen Murphy
parent 9a313cfbcc
commit 2fbca8bf65

View File

@@ -12,18 +12,18 @@ URL: https://launchpad.net/{{ pypi_name }}
Source0: https://files.pythonhosted.org/packages/source/o/{{ pypi_name }}/{{ pypi_name }}-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/o/{{ pypi_name }}/{{ pypi_name }}-%{version}.tar.gz
BuildRequires: openstack-macros BuildRequires: openstack-macros
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: {{ py2pkg('eventlet') }} BuildRequires: {{ py2pkg('eventlet', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslo.concurrency') }} BuildRequires: {{ py2pkg('os-testr', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslo.i18n') }} BuildRequires: {{ py2pkg('oslo.concurrency', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslo.log') }} BuildRequires: {{ py2pkg('oslo.i18n', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslo.utils') }} BuildRequires: {{ py2pkg('oslo.log', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslotest') }} BuildRequires: {{ py2pkg('oslo.utils', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('paramiko') }} BuildRequires: {{ py2pkg('oslotest', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('pbr') }} BuildRequires: {{ py2pkg('paramiko', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('six') }} BuildRequires: {{ py2pkg('pbr', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('testrepository') }} BuildRequires: {{ py2pkg('six', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('testscenarios') }} BuildRequires: {{ py2pkg('testscenarios', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('testtools') }} BuildRequires: {{ py2pkg('testtools', py_versions=['py2', 'py3']) }}
Requires: {{ py2pkg('Babel') }} Requires: {{ py2pkg('Babel') }}
Requires: {{ py2pkg('eventlet') }} Requires: {{ py2pkg('eventlet') }}
Requires: {{ py2pkg('oslo.concurrency') }} Requires: {{ py2pkg('oslo.concurrency') }}
@@ -34,16 +34,17 @@ Requires: {{ py2pkg('paramiko') }}
Requires: {{ py2pkg('pbr') }} Requires: {{ py2pkg('pbr') }}
Requires: {{ py2pkg('six') }} Requires: {{ py2pkg('six') }}
BuildArch: noarch BuildArch: noarch
%python_subpackages
%description %description
XenAPI library for OpenStack projects. XenAPI library for OpenStack projects.
%package doc %package -n {{ py2name() }}-doc
Summary: Documentation for OpenStack log library Summary: Documentation for OpenStack log library
BuildRequires: {{ py2pkg('Sphinx') }} BuildRequires: {{ py2pkg('Sphinx') }}
BuildRequires: {{ py2pkg('oslosphinx') }} BuildRequires: {{ py2pkg('oslosphinx') }}
%description doc %description -n {{ py2name() }}-doc
Documentation for the os-xenapi module. Documentation for the os-xenapi module.
%prep %prep
@@ -51,28 +52,37 @@ Documentation for the os-xenapi module.
%py_req_cleanup %py_req_cleanup
%build %build
%{py2_build} %{python_build}
# generate html docs # generate html docs
%{__python2} setup.py build_sphinx %{__python2} setup.py build_sphinx
rm -rf doc/build/html/.{doctrees,buildinfo} rm -rf doc/build/html/.{doctrees,buildinfo}
%install %install
%{py2_install} %{python_install}
%python_clone -a %{buildroot}%{_bindir}/xenapi_bootstrap
%post
%python_install_alternative xenapi_bootstrap
%postun
%python_uninstall_alternative xenapi_bootstrap
%if 0%{?with_tests} %if 0%{?with_tests}
%check %check
%{__python2} setup.py test ostestr --blacklist_file exclusion_py3.txt --concurrency 1
%endif %endif
%files %files %{python_files}
%license LICENSE %license LICENSE
%doc ChangeLog README.rst %doc ChangeLog README.rst
%{python2_sitelib}/os_xenapi %{python_sitelib}/os_xenapi
%{python2_sitelib}/*.egg-info %{python_sitelib}/*.egg-info
%{_bindir}/xenapi_bootstrap %python_alternative %{_bindir}/xenapi_bootstrap
%files doc %files -n {{ py2name() }}-doc
%license LICENSE %license LICENSE
%doc doc/build/html %doc doc/build/html