# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} # Tarfile created using svn # svn co http://svn2.assembla.com/svn/elements # svn export -r %{svnrevision} . %{name}-%{version} | tar -cjvf ~/%{name}-%{version}-%{svndate}.tar.bz2 %{name}-%{version} %define svndate 20100110 %define svnrevision 230 %define tarfile %{name}-%{version}-%{svndate}.tar.bz2 Name: python-elements Version: 0.13 Release: 1.%{svndate}svn%{?dist} Summary: A 2D Physics API for Python Group: Development/Languages License: GPLv3+ URL: http://www.assembla.com/wiki/show/elements Source0: %{tarfile} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools Requires: pybox2d %description An easy to use API for integrating 2D physics (with pybox2d) into own python ideas, that includes user interfaces & simulations, as well as teaching & learning tools. %prep %setup -q %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT # calm rpmlint down sed -i $RPM_BUILD_ROOT%{python_sitelib}/elements/elements.py -e 1d %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CREDITS LICENSE README %{python_sitelib}/* %changelog * Sun Jan 10 2009 Sebastian Dziallas - 0.13-1.20100110svn - initial packaging