2 %define module setuptools
4 Summary: A collection of enhancements to the Python distutils
5 Name: python-setuptools
9 Group: Development/Languages/Python
10 Source0: http://cheeseshop.python.org/packages/source/s/setuptools/setuptools-%{version}.zip
11 # Source0-md5: 3eecdf66c1a2cf8a6556bc00b69d572a
12 URL: http://peak.telecommunity.com/DevCenter/setuptools
13 BuildRequires: findutils
15 BuildRequires: python-devel
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 setuptools is a collection of enhancements to the Python distutils
22 (for Python 2.3.5 and up on most platforms; 64-bit platforms require a
23 minimum of Python 2.4) that allow you to more easily build and
24 distribute Python packages, especially ones that have dependencies on
28 %setup -q -n %{module}-%{version}
31 python ./setup.py build
34 rm -rf $RPM_BUILD_ROOT
36 python ./setup.py install \
38 --root=$RPM_BUILD_ROOT
40 find $RPM_BUILD_ROOT -type f -name '*.pyc' -exec rm "{}" ";"
41 find $RPM_BUILD_ROOT -type f -name '*.pyo' -exec rm "{}" ";"
42 find $RPM_BUILD_ROOT -type f -exec sed -i -e "s#$RPM_BUILD_ROOT##g" "{}" ";"
44 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
45 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
48 echo '%{module}-%{version}-py%{py_ver}.egg' > $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}.pth
51 rm -rf $RPM_BUILD_ROOT
54 %defattr(644,root,root,755)
56 %attr(755,root,root) %{_bindir}/*
57 %{py_sitescriptdir}/%{module}*