From 40f34a0ba3aab6d4085ddb391eefaab5f2b14405 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Nov 09 2015 17:53:15 +0000 Subject: Add %python_provides to qt/wx sub-packages - Use sub-dirs for build --- diff --git a/python-pyface.spec b/python-pyface.spec index 1dbb430..2a69480 100644 --- a/python-pyface.spec +++ b/python-pyface.spec @@ -2,7 +2,7 @@ Name: python-%{modname} Version: 5.0.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Generic User Interface objects # Images have different licenses. For image license breakdown check @@ -67,6 +67,7 @@ Python 3 version. %package -n python2-%{modname}-qt Summary: Qt backend placeholder for pyface +%{?python_provide:%python_provide python2-%{modname}-qt} Requires: python2-%{modname} = %{version}-%{release} BuildRequires: PyQt4 Requires: PyQt4 @@ -78,6 +79,7 @@ Qt backend placeholder for pyface. %package -n python3-%{modname}-qt Summary: Qt backend placeholder for pyface +%{?python_provide:%python_provide python3-%{modname}-qt} Requires: python3-%{modname} = %{version}-%{release} BuildRequires: python3-PyQt4 Requires: python3-PyQt4 @@ -88,6 +90,7 @@ Qt backend placeholder for pyface. %package -n python2-%{modname}-wx Summary: wx backend placeholder for pyface +%{?python_provide:%python_provide python2-%{modname}-wx} Requires: python2-%{modname} = %{version}-%{release} BuildRequires: wxPython Requires: wxPython @@ -98,38 +101,46 @@ Obsoletes: %{name}-wx <= 5.0.0-2 wx backend placeholder for pyface. %prep -%setup -q -n pyface-%{version} +%setup -qcn pyface-%{version} +mv pyface-%{version} python2 +pushd python2 %patch0 -p1 # file not utf-8 for f in image_LICENSE_{Eclipse,OOo}.txt do iconv -f iso8859-1 -t utf-8 ${f} > ${f}.conv && mv -f ${f}.conv ${f} done +ln -s image_LICENSE*.txt LICENSE.txt CHANGES.txt README.rst examples .. +popd + +cp -a python2 python3 -mkdir %{py3dir} -cp -a . %{py3dir} %build -%py2_build -pushd %{py3dir} +pushd python2 + %py2_build +popd +pushd python3 %py3_build popd %install -%py2_install -pushd %{py3dir} +pushd python2 + %py2_install +popd +pushd python3 %py3_install popd %check # Don't fail on testing due to: # https://github.com/enthought/pyface/issues/180 -pushd build/lib/ +pushd python2/build/lib/ xvfb-run nosetests-%{python2_version} -v || : popd # xvfb-run will fail to start immediately sleep 5 -pushd %{py3dir}/build/lib/ +pushd python3/build/lib/ xvfb-run nosetests-%{python3_version} -v || : popd @@ -148,6 +159,10 @@ popd %files -n python2-%{modname}-wx %changelog +* Mon Nov 9 2015 Orion Poplawski - 5.0.0-5 +- Add %%python_provides to qt/wx sub-packages +- Use sub-dirs for build + * Sat Nov 07 2015 Igor Gnatenko - 5.0.0-4 - Rebuild against traitsui