%if (0%{?fedora} > 12 || 0%{?rhel} > 6) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif %define mod_name yolk Name: python-%{mod_name} Version: 0.4.1 Release: 4%{?dist} Url: http://tools.assembla.com/yolk Summary: Command-line tool querying PyPI and Python packages installed on your system License: GPLv2 Group: Development/Languages Source: http://pypi.python.org/packages/source/y/%{mod_name}/%{mod_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools %description Yolk is a Python tool for obtaining information about packages installed by distutils, setuptools and easy_install and querying packages on PyPI (Python Package Index a.k.a. The Cheese Shop). Yolk can list all the packages installed by distutils or setuptools on your system by Python2.5 or packages installed by setuptools if you have Python2.4. You can see which packages are active, non-active or in development mode and show you which have newer versions available by querying PyPI. %prep %setup -q -n %{mod_name}-%{version} %build python setup.py build %check python setup.py test %install rm -rf %{buildroot} python setup.py install -O1 --skip-build --prefix %{_prefix} --root %{buildroot} chmod 0755 %{buildroot}/%{python_sitelib}/%{mod_name}/setuptools_support.py mkdir -p %{buildroot}/%{_mandir}/man1/ cp docs/yolk.1 %{buildroot}/%{_mandir}/man1/ %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING CREDITS FAQ INSTALL NEWS PKG-INFO README THANKS TODO examples/* %{_bindir}/* %{python_sitelib}/%{mod_name}* %{_mandir}/man1/%{mod_name}.1.gz %changelog * Tue Jun 14 2011 Jerome Soyer - 0.4.1-4 - Add check section for test - Remove some python macros * Thu Jun 9 2011 Jerome Soyer - 0.4.1-3 - Remove unneeded find command and flags * Wed Jun 8 2011 Jerome Soyer - 0.4.1-2 - Remove python3 support * Thu May 12 2011 Jerome Soyer - 0.4.1-1 - Initial build