%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define module bicyclerepair %define sedcmd 1s@^#!.*python\\(.\\..\\)\\?@@ Name: python-%{module} Version: 0.9 Release: 3%{?dist} Summary: Python Refactoring Browser License: BSD Group: Development/Languages URL: http://%{module}.sourceforge.net/ Source0: http://prdownloads.sourceforge.net/%{module}/%{module}-%{version}.tar.gz BuildRequires: python-devel BuildRequires: python-setuptools Provides: %{module} = %{version}-%{release} Requires: python BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildArch: noarch %description The Python Refactoring Browser, helping Pythonistas everywhere glide over the gory details of refactoring their code. Watch him extract jumbled code into well ordered classes. Gasp, as he renames all occurrences of a method. Thank You Bicycle Repair Man! %prep %setup -q -n %{module}-%{version} # fixup encoding for f in "AUTHORS" "README.emacs" "ChangeLog"; do iconv -f ISO8859-1 -t UTF-8 -o $f.new $f touch -r $f $f.new mv $f.new $f done %build %{__python} -c 'import setuptools; execfile("setup.py")' build %install rm -rf %{buildroot} %{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} find $RPM_BUILD_ROOT%{python_sitelib} -type f -exec chmod 0644 '{}' \; find $RPM_BUILD_ROOT%{python_sitelib} -type f -exec sed -i '%{sedcmd}' {} \; %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING INSTALL PKG-INFO NEWS README README.emacs README.vim %{python_sitelib}/* %changelog * Thu Feb 05 2009 Jerome Soyer - 0.9-3 - Change libdir macro to python_sitelib * Fri Jan 16 2009 Jerome Soyer - 0.9-2 - Fix *.py to chmod 0644 - Change Requires python to python-devel - Fix unneeded shebang * Thu Jan 15 2009 Jerome Soyer - 0.9-1 - Initial Fedora Package