
This is now obsolete, as the %py_req_cleanup macro does that as a side-effect. Change-Id: Ie8ae07e53f90ea5d183f89c82b27ad8ae76c0fd2
98 lines
3.1 KiB
Django/Jinja
98 lines
3.1 KiB
Django/Jinja
{% set pypi_name = 'os-testr' %}
|
|
{% set upstream_version = upstream_version('1.0.0') %}
|
|
{% set rpm_release = '1' %}
|
|
{% set source = url_pypi() %}
|
|
|
|
Name: {{ py2name() }}
|
|
Version: {{ py2rpmversion() }}
|
|
Release: {{ py2rpmrelease() }}
|
|
Summary: A testr wrapper to provide functionality for OpenStack projects
|
|
License: {{ license('Apache-2.0') }}
|
|
Group: Development/Languages/Python
|
|
URL: https://docs.openstack.org/developer/os-testr
|
|
Source0: {{ source }}
|
|
BuildRequires: openstack-macros
|
|
BuildRequires: {{ py2pkg('devel', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('ddt', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('oslotest', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('pbr', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('six', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('stestr', py_versions=['py2', 'py3']) }}
|
|
BuildRequires: {{ py2pkg('testscenarios', py_versions=['py2', 'py3']) }}
|
|
Requires: {{ py2pkg('pbr') }}
|
|
Requires: {{ py2pkg('python-subunit') }}
|
|
Requires: {{ py2pkg('stestr') }}
|
|
Requires: {{ py2pkg('testtools') }}
|
|
BuildArch: noarch
|
|
%if 0%{?suse_version}
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
%else
|
|
# on RDO, update-alternatives is in chkconfig
|
|
Requires(post): chkconfig
|
|
Requires(postun): chkconfig
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
A testr wrapper to provide functionality for OpenStack projects
|
|
* Documentation: https://docs.openstack.org/developer/os-testr
|
|
* Source: http://git.openstack.org/cgit/openstack/os-testr
|
|
* Bugs: https://bugs.launchpad.net/os-testr
|
|
|
|
%package -n python-os-testr-doc
|
|
Summary: Documentation for the testr
|
|
Group: Documentation/HTML
|
|
BuildRequires: {{ py2pkg('Sphinx') }}
|
|
BuildRequires: {{ py2pkg('openstackdocstheme') }}
|
|
|
|
%description -n python-os-testr-doc
|
|
Documentation for the testr wrapper.
|
|
|
|
%prep
|
|
%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }}
|
|
%py_req_cleanup
|
|
|
|
%build
|
|
%{python_build}
|
|
|
|
# generate html docs
|
|
%{__python2} setup.py build_sphinx
|
|
# remove the sphinx-build leftovers
|
|
rm -rf doc/build/html/.{doctrees,buildinfo}
|
|
|
|
%install
|
|
%{python_install}
|
|
%python_clone -a %{buildroot}%{_bindir}/generate-subunit
|
|
%python_clone -a %{buildroot}%{_bindir}/ostestr
|
|
%python_clone -a %{buildroot}%{_bindir}/subunit-trace
|
|
%python_clone -a %{buildroot}%{_bindir}/subunit2html
|
|
|
|
%post
|
|
%python_install_alternative generate-subunit
|
|
%python_install_alternative ostestr
|
|
%python_install_alternative subunit-trace
|
|
%python_install_alternative subunit2html
|
|
|
|
%postun
|
|
%python_uninstall_alternative generate-subunit
|
|
%python_uninstall_alternative ostestr
|
|
%python_uninstall_alternative subunit-trace
|
|
%python_uninstall_alternative subunit2html
|
|
|
|
%files %{python_files}
|
|
%defattr(-,root,root,-)
|
|
%license LICENSE
|
|
%python_alternative %{_bindir}/generate-subunit
|
|
%python_alternative %{_bindir}/ostestr
|
|
%python_alternative %{_bindir}/subunit-trace
|
|
%python_alternative %{_bindir}/subunit2html
|
|
%{python_sitelib}/os_testr
|
|
%{python_sitelib}/os_testr*egg-info
|
|
|
|
%files -n python-os-testr-doc
|
|
%license LICENSE
|
|
%doc doc/build/html README.rst ChangeLog
|
|
|
|
%changelog
|