Blob Blame History Raw
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

%define real_name line_profiler
%define pre_release b2

Name:           python-%{real_name}
Version:        1.0
Release:        0.4.%{pre_release}%{?dist}
Summary:        A Python line-by-line profiler

Group:          Development/Languages
License:        BSD
URL:  {real_name}
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python-devel

line_profiler will profile the time individual lines of code take to execute.

%setup -q -n %{real_name}-%{version}%{pre_release}

# Fix non-executable-script error
%{__sed} -i '/^#!\/usr\/bin\/env\ python/d' %{real_name}.py

CFLAGS="%{optflags}" %{__python} build

rm -rf %{buildroot}
%{__python} install -O1 --skip-build --root %{buildroot}

# Fix non-standard-executable-perm error
chmod 0755 %{buildroot}%{python_sitearch}/_%{real_name}.so

# Rename to fix various .py bindir issues
mv %{buildroot}%{_bindir}/ %{buildroot}%{_bindir}/kernprof

rm -rf %{buildroot}


* Sun Jul 26 2009 Fedora Release Engineering <> - 1.0-0.4.b2
- Rebuilt for

* Mon Jun 01 2009 Silas Sewell <> - 1.0-0.3.b2
- Rename to kernprof

* Fri May 29 2009 Silas Sewell <> - 1.0-0.2.b2
- Remove pyc and pyo exclude for bindir as Koji doesn't create them

* Wed May 27 2009 Silas Sewell <> - 1.0-0.1.b2
- Initial build