From a82a82f4f5f8351e91cf9d6998836e76e7e5c92f Mon Sep 17 00:00:00 2001 From: Carl George Date: Dec 13 2018 02:37:55 +0000 Subject: Remove python3-os-testr-doc subpackage It duplicates the content of the python-os-testr-doc subpackage. --- diff --git a/python-os-testr.spec b/python-os-testr.spec index 5594d8a..18e79c4 100644 --- a/python-os-testr.spec +++ b/python-os-testr.spec @@ -15,9 +15,6 @@ URL: http://git.openstack.org/cgit/openstack/%{pypi_name} Source0: http://tarballs.openstack.org/os-testr/os-testr-%{upstream_version}.tar.gz BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python2-pbr -BuildRequires: python2-setuptools %global _description\ ostestr is a testr wrapper that uses subunit-trace for output and builds\ @@ -27,6 +24,9 @@ some helpful extra functionality around testr. %package -n python2-%{pypi_name} Summary: %summary +BuildRequires: python2-devel +BuildRequires: python2-pbr +BuildRequires: python2-setuptools Requires: python2-pbr Requires: python2-babel Requires: python2-testrepository @@ -61,87 +61,54 @@ some helpful extra functionality around testr. %package doc Summary: Documentation for ostestr module +%if %{with python3} +BuildRequires: python3-sphinx +BuildRequires: python3-oslo-sphinx +%else BuildRequires: python2-sphinx BuildRequires: python2-oslo-sphinx +%endif +Provides: python3-%{pypi_name}-doc = %{version}-%{release} +Obsoletes: python3-%{pypi_name}-doc < 0.8.0-8 %description doc Documentation for ostestr module -%if 0%{?with_python3} -%package -n python3-%{pypi_name}-doc -Summary: Documentation for ostestr module -BuildRequires: python3-sphinx -BuildRequires: python3-oslo-sphinx - -%description -n python3-%{pypi_name}-doc -Documentation for ostestr module -%endif - %prep -%setup -qc -n %{pypi_name}-%{upstream_version} -mv %{pypi_name}-%{upstream_version} python2 - -pushd python2 +%setup -q -n %{pypi_name}-%{upstream_version} # Let RPM handle the dependencies rm -f test-requirements.txt requirements.txt -cp -p LICENSE ChangeLog CONTRIBUTING.rst PKG-INFO README.rst ../ -popd - -%if 0%{?with_python3} -cp -a python2 python3 -%endif - # delete shebangs find -name '*.py' | xargs sed -i -e '1 {/^#!/d}' %build -pushd python2 -%{__python2} setup.py build -popd -%if 0%{?with_python3} -pushd python3 -%{__python3} setup.py build -popd -%endif +%py2_build +%{?with_python3:%py3_build} + +sphinx-build%{?with_python3:-3} -b html -d build/doctrees doc/source doc/build/html + +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.buildinfo + +# Fix this rpmlint warning +sed -i "s|\r||g" doc/build/html/_static/jquery.js + %install -pushd python2 -%{__python2} setup.py install --skip-build --root=$RPM_BUILD_ROOT +%py2_install for file in $RPM_BUILD_ROOT%{python2_sitelib}/os_testr/{subunit_trace,ostestr,subunit2html}.py; do chmod a+x $file done -export PYTHONPATH="$( pwd ):$PYTHONPATH" -pushd doc -sphinx-build -b html -d build/doctrees source build/html -# Fix hidden-file-or-dir warnings -rm -fr build/html/.buildinfo - -# Fix this rpmlint warning -sed -i "s|\r||g" build/html/_static/jquery.js -popd -popd %if 0%{?with_python3} -pushd python3 -%{__python3} setup.py install --skip-build --root=$RPM_BUILD_ROOT +%py3_install for file in $RPM_BUILD_ROOT%{python3_sitelib}/os_testr/{subunit_trace,ostestr,subunit2html}.py;do chmod a+x $file done -export PYTHONPATH="$( pwd ):$PYTHONPATH" -pushd doc -sphinx-build-3 -b html -d build/doctrees source build/html - -# Fix hidden-file-or-dir warnings -rm -fr build/html/.buildinfo - -# Fix this rpmlint warning -sed -i "s|\r||g" build/html/_static/jquery.js -popd -popd %endif @@ -171,17 +138,13 @@ popd %files doc %license LICENSE -%doc python2/doc/build/html +%doc doc/build/html -%if 0%{?with_python3} -%files -n python3-%{pypi_name}-doc -%license LICENSE -%doc python3/doc/build/html -%endif %changelog * Wed Dec 12 2018 Carl George - 0.8.0-8 - Remove all shebangs to prevent incorrect dependencies rhbz#1391119 +- Remove python3-os-testr-doc subpackage (duplicate content of python-os-testr-doc) * Sat Jul 14 2018 Fedora Release Engineering - 0.8.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild