%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif Summary: A library to assist the building of PyGTK applications Name: pygtkhelpers Version: 0.4.2 Release: 2%{?dist} License: LGPLv3 Group: Development/Tools URL: http://packages.python.org/pygtkhelpers/ Source0: http://pypi.python.org/packages/source/p/pygtkhelpers/pygtkhelpers-%{version}.tar.gz BuildRequires: python2-devel %description PyGTKHelpers is a library to assist the building of PyGTK applications. It is intentionally designed to be non-frameworky, and blend well with your particular style of PyGTK development. %package examples Summary: Examples for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} %description examples Examples for PyGTKHelpers %prep %setup -q %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT # Files containing shebangs sed -i -e '/^#!\//, 1d' $RPM_BUILD_ROOT%{python_sitelib}/%{name}/debug/console.py %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AUTHORS.txt LICENSE.txt docs %{python_sitelib}/%{name}/ %{python_sitelib}/%{name}-*.egg-info %files examples %defattr(-,root,root,-) %doc examples %changelog * Thu Apr 14 2011 Lukas Zapletal - 0.4.2-2 - splitting examples * Sat Apr 09 2011 Lukas Zapletal - 0.4.2-1 - initial version