From a1057a70a34404e5666e6e81b25d8503baa73927 Mon Sep 17 00:00:00 2001 From: Haikel Guemar Date: Jul 25 2018 11:55:28 +0000 Subject: Modernize spec files Fix FTBFS (RHBZ#1605632) --- diff --git a/python-cliff.spec b/python-cliff.spec index c1f0a9b..c6da14f 100644 --- a/python-cliff.spec +++ b/python-cliff.spec @@ -7,7 +7,7 @@ Name: python-%{modname} Version: 2.13.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Command Line Interface Formulation Framework Group: Development/Libraries @@ -17,14 +17,6 @@ Source0: %pypi_source cliff BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-pbr -BuildRequires: python2-prettytable -BuildRequires: python2-cmd2 >= 0.6.7 -BuildRequires: python2-stevedore -BuildRequires: python2-six - %description cliff is a framework for building command line programs. It uses setuptools @@ -39,6 +31,15 @@ http://readthedocs.org/docs/cliff/en/latest/ Summary: Command Line Interface Formulation Framework %{?python_provide:%python_provide python2-%{modname}} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr +BuildRequires: python2-prettytable +BuildRequires: python2-cmd2 >= 0.6.7 +BuildRequires: python2-stevedore +BuildRequires: python2-six + + Requires: python2-prettytable Requires: python2-cmd2 >= 0.6.7 Requires: python2-stevedore >= 1.20.0 @@ -124,10 +125,12 @@ Summary: Command Line Interface Formulation Framework %{?python_provide:%python_provide python3-%{modname}-tests} # Required for the test suite +BuildRequires: python3-mock BuildRequires: bash BuildRequires: python3-unicodecsv BuildRequires: python3-PyYAML BuildRequires: which +BuildRequires: python3-docutils BuildRequires: python3-subunit BuildRequires: python3-testrepository BuildRequires: python3-testscenarios @@ -154,35 +157,32 @@ rm -rf {test-,}requirements.txt # Remove bundled egg info rm -rf *.egg-info -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - %build -%{__python2} setup.py build +%py2_build %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd +%py3_build %endif %install %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root=%{buildroot} -popd +%py3_install %endif -%{__python2} setup.py install -O1 --skip-build --root=%{buildroot} +%py2_install %check %if 0%{?with_python3} +# FIXME(hguemar): required as unversioned python binary has been moved +# to a separate package in F29+ +# Will be useless when cliff switches to stestr as its tests runner +export PYTHON=python3 %{__python3} setup.py test rm -rf .testrepository %endif +export PYTHON=python2 %{__python2} setup.py test +unset -v PYTHON %files -n python2-%{modname} %license LICENSE @@ -207,6 +207,10 @@ rm -rf .testrepository %endif %changelog +* Wed Jul 25 2018 Haïkel Guémar - 2.13.0-2 +- Modernize spec files +- Fix FTBFS (RHBZ#1605632) + * Wed Jul 25 2018 Pierre-Yves Chibon - 2.13.0 - Update to 2.13.0