%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %global alphatag b4 Name: RunSnakeRun Version: 2.0.0 Release: 0.3.%{alphatag}%{?dist} Summary: GUI Viewer for Python profiling runs Group: Development/Languages License: BSD URL: http://www.vrplumber.com/programming/runsnakerun/ Source0: http://pypi.python.org/packages/source/R/RunSnakeRun/RunSnakeRun-%{version}%{alphatag}.tar.gz Source1: RunSnakeRun.desktop BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: desktop-file-utils Requires: python-squaremap %description RunSnakeRun is a small GUI utility that allows you to view (Python) "cProfile" or "Profile" profiler dumps in a sortable GUI view. It allows you to explore the profiler information using a "square map" visualization or sortable tables of data. %prep %setup -q -n %{name}-%{version}%{alphatag} # Remove redundant shebang from runsnake.py: sed -i -e '/^#!/, 1d' runsnake.py %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT desktop-file-install \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ %{SOURCE1} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc license.txt %{_bindir}/runsnake %{python_sitelib}/runsnakerun %{python_sitelib}/RunSnakeRun*.egg-info %{_datadir}/applications/RunSnakeRun.desktop %changelog * Wed Mar 3 2010 David Malcolm - 2.0.0-0.3.b4 - remove redundant shebang from runsnakerun.py * Tue Mar 2 2010 David Malcolm - 2.0.0-0.2.b4 - add license.txt - explicitly list egg-info in %%files - add a desktop file - reworded package description * Wed Feb 24 2010 David Malcolm - 2.0.0-0.1.b4 - initial package