%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitelib_arch: %define python_sitelib_arch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")} Summary: Debugger using ptrace written in Python Name: python-ptrace Version: 0.6 Release: 1%{?dist} License: GPLv2 Group: Development/Tools URL : http://python-ptrace.hachoir.org/ Source0: http://pypi.python.org/packages/source/p/python-ptrace/%{name}-%{version}.tar.gz #BuildRequires: mercurial python-nose subversion BuildRequires: python-setuptools-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description python-ptrace is a debugger using ptrace written in Python. Fearures: * High level Python object API : PtraceDebugger and PtraceProcess * Able to control multiple processes: catch fork events on Linux * Read/write bytes to arbitrary address: take care of memory alignment and split bytes to cpu word * Execution step by step using ptrace_singlestep() or hardware interruption 3 * Dump registers, memory mappings, stack, etc. * Syscall tracer and parser (strace.py command) * Can use distorm disassembler (if available) %prep %setup -q %build %{__python} setup.py build %{__python} setup_cptrace.py build %install %{__rm} -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} %{__python} setup_cptrace.py install -O1 --skip-build --root %{buildroot} %{__chmod} 0644 examples/*.py %{__rm} -f %{buildroot}%{_bindir}/{gdb,strace}.{pyo,pyc} %clean %{__rm} -rf %{buildroot} %check %{__python} ./test_doc.py %files %defattr(-, root, root, -) %doc AUTHORS ChangeLog COPYING README README.cptrace TODO %doc doc examples %exclude %{_bindir}/gdb.py[co] %exclude %{_bindir}/strace.py[co] %{_bindir}/gdb.py %{_bindir}/strace.py %{python_sitelib}/ptrace/ %{python_sitelib}/python_ptrace-*-py%{pyver}.egg-info %{python_sitelib_arch}/cptrace.so %{python_sitelib_arch}/ptrace-*-py%{pyver}.egg-info %changelog * Wed Mar 4 2009 Terje Rosten - 0.6-1 - 0.6 * Sat Sep 13 2008 Terje Rosten - 0.5-1 - 0.5