# 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 # cd elements # svn export -r %{svnrevision} . %{name}-%{version} # tar -cjvf ~/%{name}-%{version}-%{svndate}.tar.bz2 %{name}-%{version} %global svndate 20100110 %global svnrevision 230 %global tarfile %{name}-%{version}-%{svndate}.tar.bz2 Name: python-elements Version: 0.13 Release: 3.%{svndate}svn%{?dist} Summary: A 2D Physics API for Python Group: Development/Libraries 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 # calm rpmlint down sed -i elements/elements.py -e 1d %build %{__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 CREDITS LICENSE README %{python_sitelib}/* %changelog * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.13-3.20100110svn - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Mon Jan 11 2009 Sebastian Dziallas <sebastian@when.com> - 0.13-2.20100110svn - implement comments from the review * Sun Jan 10 2009 Sebastian Dziallas <sebastian@when.com> - 0.13-1.20100110svn - initial packaging