%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: python-testosterone Version: 0.4.1 Release: 1%{?dist} Summary: Text-based UI for running Python unit tests Group: Development/Languages License: BSD URL: http://code.google.com/p/testosterone/ # was at http://www.zetadev.com/software/testosterone/ Source0: http://www.zetadev.com/software/testosterone/0.4.1/testosterone-0.4.1.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel %description Testosterone is a curses-based interface for running python tests written with the PyUnit testing framework (aka unittest in the standard library). %prep %setup -q -n testosterone-%{version} %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_bindir} install -m 755 bin/testosterone.py $RPM_BUILD_ROOT/%{_bindir}/testosterone gzip -c -9 doc/testosterone.1 > testosterone.1.gz mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/ install -m 444 testosterone.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/testosterone.1.gz %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README %{python_sitelib}/* %{_bindir}/testosterone %{_mandir}/man1/testosterone.1.gz %changelog * Wed May 20 2009 David Malcolm - 0.4.1-1 - initial package