%global modname pyface Name: python-%{modname} Version: 5.0.0 Release: 5%{?dist} Summary: Generic User Interface objects # Images have different licenses. For image license breakdown check # image_LICENSE.txt file. License: BSD and EPL and LGPLv2+ and Public Domain URL: http://code.enthought.com/projects/traits_ui/ # Current release is missing files # https://github.com/enthought/pyface/issues/98 #Source0: http://www.enthought.com/repo/ets/pyface-%{version}.tar.gz Source0: https://github.com/enthought/pyface/archive/%{version}.tar.gz#/pyface-%{version}.tar.gz # Fix python syntax error # https://github.com/enthought/pyface/pull/178 Patch0: pyface-python.patch Obsoletes: %{name}-doc <= 5.0.0-2 BuildArch: noarch BuildRequires: /usr/bin/xvfb-run %description Pyface enables programmers to interact with generic UI objects, such as an "MDI Application Window", rather than with raw UI widgets. (Pyface is named by analogy to JFace in Java.) Traits uses Pyface to implement views and editors for displaying and editing Traits-based objects. %package -n python2-%{modname} Summary: %{summary} %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel python2-setuptools BuildRequires: python2-Traits python2-traitsui BuildRequires: python-pygments BuildRequires: python2-nose python-mock Requires: python2-Traits python2-traitsui Requires: python-pygments Requires: python2-%{modname}-backend %description -n python2-%{modname} Pyface enables programmers to interact with generic UI objects, such as an "MDI Application Window", rather than with raw UI widgets. (Pyface is named by analogy to JFace in Java.) Traits uses Pyface to implement views and editors for displaying and editing Traits-based objects. Python 2 version. %package -n python3-%{modname} Summary: %{summary} %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel python3-setuptools BuildRequires: python3-Traits python3-traitsui BuildRequires: python3-pygments BuildRequires: python3-nose python3-mock Requires: python3-Traits python3-traitsui Requires: python3-pygments Requires: python3-%{modname}-backend BuildRequires: /usr/bin/2to3 %description -n python3-%{modname} Pyface enables programmers to interact with generic UI objects, such as an "MDI Application Window", rather than with raw UI widgets. (Pyface is named by analogy to JFace in Java.) Traits uses Pyface to implement views and editors for displaying and editing Traits-based objects. 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 Provides: python2-%{modname}-backend Obsoletes: %{name}-qt <= 5.0.0-2 %description -n python2-%{modname}-qt 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 Provides: python3-%{modname}-backend %description -n python3-%{modname}-qt 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 Provides: python2-%{modname}-backend Obsoletes: %{name}-wx <= 5.0.0-2 %description -n python2-%{modname}-wx wx backend placeholder for pyface. %prep %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 %build pushd python2 %py2_build popd pushd python3 %py3_build popd %install 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 python2/build/lib/ xvfb-run nosetests-%{python2_version} -v || : popd # xvfb-run will fail to start immediately sleep 5 pushd python3/build/lib/ xvfb-run nosetests-%{python3_version} -v || : popd %files -n python2-%{modname} %license image_LICENSE*.txt LICENSE.txt %doc CHANGES.txt README.rst examples %{python2_sitelib}/%{modname}* %files -n python3-%{modname} %license image_LICENSE*.txt LICENSE.txt %doc CHANGES.txt README.rst examples %{python3_sitelib}/%{modname}* %files -n python2-%{modname}-qt %files -n python3-%{modname}-qt %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 * Sat Nov 07 2015 Igor Gnatenko - 5.0.0-3 - Fix BR/Rs * Fri Nov 06 2015 Igor Gnatenko - 5.0.0-2 - Return back to PyQt4 - Add python3-subpackages (only qt backend supported) - Fix license a bit * Thu Nov 5 2015 Orion Poplawski - 5.0.0-1 - Update to 5.0.0 - Switch qt requires to pyside * Thu Nov 5 2015 Orion Poplawski - 4.5.2-1 - Update to 4.5.2 - Add BR/R on python-pygments * Thu Jun 18 2015 Fedora Release Engineering - 4.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 4.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Mar 13 2014 Orion Poplawski - 4.4.0-1 - Update to 4.4.0 * Mon Sep 16 2013 Orion Poplawski - 4.3.0-4 - Create dummy backend packages to express dependencies * Sun Aug 04 2013 Fedora Release Engineering - 4.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Apr 25 2013 Orion Poplawski - 4.3.0-2 - Fix non-UTF-8 files - Add doc sub-package - Be more explicit with files * Tue Apr 23 2013 Orion Poplawski - 4.3.0-1 - Initial package