%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: python-meliae Version: 0.4.0 Release: 2%{?dist} Summary: Python memory usage statistics Group: Development/Languages License: GPLv3 URL: https://launchpad.net/meliae Source0: http://launchpad.net/meliae/trunk/0.4/+download/meliae-0.4.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildRequires: Cython BuildRequires: python-simplejson %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} %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 %check # run_tests.py doesn't seem to work in the main directory: sys.path pulls in # the dir of the script, which contains meliae/intset.pyx, but the built # intset.so has been installed elsewhere in the tree, leading to: # ImportError: cannot import name _intset # The meliae.tests directory isn't installed, so we do need to run from this # directory. # As a crude workaround, copy the .so files back into the source tree: cp $RPM_BUILD_ROOT/%{python_sitearch}/meliae/*.so meliae %{__python} run_tests.py --verbose %files %defattr(-,root,root,-) %doc CHANGES.txt COPYING.txt README.txt TODO.txt %{_bindir}/strip_duplicates.py %{python_sitearch}/meliae %{python_sitearch}/meliae-*-py?.?.egg-info %changelog * Tue Mar 13 2012 Luke Macken <lmacken@redhat.com> - 0.4.0-2 - Add python-simplejson to the BuildRequires to fix a couple of unit tests * Tue Jan 24 2012 David Malcolm <dmalcolm@redhat.com> - 0.4.0-1 - 0.4.0 - drop upstream patch 1 (meliae-0.2.0-fix-builtintype-heap-assertion.patch) - add a %%check section, running the upstream test suite * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.2.0-4 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Thu Apr 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.2.0-3 - rewrite files stanza to ensure that egg-info was generated (Thomas Spura) * Fri Mar 26 2010 David Malcolm <dmalcolm@redhat.com> - 0.2.0-2 - fix assertion failure seen with non-heap types * Fri Mar 26 2010 David Malcolm <dmalcolm@redhat.com> - 0.2.0-1 - initial packaging