diff --git a/.cvsignore b/.cvsignore index e69de29..f4a5a28 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +setuptools-0.6a8.zip diff --git a/python-setuptools.spec b/python-setuptools.spec new file mode 100644 index 0000000..c4512f3 --- /dev/null +++ b/python-setuptools.spec @@ -0,0 +1,51 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")} + +Name: python-setuptools +Version: 0.6a8 +Release: 1 +Summary: Download, build, install, upgrade, and uninstall Python packages + +Group: Development/Languages +License: PSFL/ZPL +URL: http://peak.telecommunity.com/DevCenter/setuptools +Source0: http://cheeseshop.python.org/packages/source/s/setuptools/setuptools-%{version}.zip +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch +BuildRequires: python-devel +Requires: python-abi = %{pyver} + +%description +setuptools is a collection of enhancements to the Python distutils that allow +you to more easily build and distribute Python packages, especially ones that +have dependencies on other packages. + +%prep +%setup -q -n setuptools-%{version} +sed -i '1s@#!python@#!/usr/bin/python@' easy_install.py + +%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 +find $RPM_BUILD_ROOT%{python_sitelib} -name \*.py -exec grep -q '^#!' {} \; -print | while read file ; do sed -i '1d' $file ; done +#find $RPM_BUILD_ROOT%{python_sitelib} -name \*.py -exec grep -q '^#!' {} \; | while read file ; do grep -q '^#!' $file && sed -i '1d' $file ; done +echo "setuptools-%{version}-py%{pyver}.egg" > $RPM_BUILD_ROOT%{python_sitelib}/setuptools.pth + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc api_tests.txt EasyInstall.txt pkg_resources.txt setuptools.txt +%{_bindir}/* +%{python_sitelib}/setuptools.pth +%{python_sitelib}/setuptools-%{version}-py%{pyver}.egg + +%changelog +* Sat Dec 24 2005 Ignacio Vazquez-Abrams 0.6a8-1 +- Initial RPM release diff --git a/sources b/sources index e69de29..3240643 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +3eecdf66c1a2cf8a6556bc00b69d572a setuptools-0.6a8.zip