%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: python-meliae Version: 0.2.0 Release: 2%{?dist} Summary: Python memory usage statistics Group: Development/Languages License: GPLv3 URL: https://launchpad.net/meliae Source0: http://launchpad.net/meliae/0.2/0.2.0/+download/meliae-0.2.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # I've seen assertion failures of the form: # python: Objects/typeobject.c:2672: type_traverse: Assertion `type->tp_flags & (1L<<9)' failed. # which is: # assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE) # when visiting the "object" (the most basic type) # # This patch bulletproofs against it: Patch1: meliae-0.2.0-fix-builtintype-heap-assertion.patch BuildRequires: python-devel BuildRequires: Cython %description "meliae" provides a way to dump python memory usage information to a JSON disk format, which can then be parsed into useful things like graph representations. The name is simply a fun word (means Ash-wood Nymph). %prep %setup -q -n meliae-%{version} %patch1 -p1 -b .fix-builtintype-heap-assertion %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CHANGES.txt COPYING.txt README.txt TODO.txt %{_bindir}/strip_duplicates.py %{python_sitearch}/* %changelog * Fri Mar 26 2010 David Malcolm - 0.2.0-2 - fix assertion failure seen with non-heap types * Fri Mar 26 2010 David Malcolm - 0.2.0-1 - initial packaging