%define name python-setuptools %define srcname setuptools %define version 0.9.8 %define release 2 %define is_python %(test -e /usr/bin/python && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %endif %define _libdir64 %{_prefix}/lib64 %define is_python_64 %(test -e /usr/bin/python_64 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(python_64 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %endif Summary: Easily download, build, install, upgrade, and uninstall Python packages Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: PSF or ZPL Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: The fellowship of the packaging Url: http://pypi.python.org/pypi/setuptools BuildRequires: python, python-devel Requires: python Provides: distribute %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. This package contains the runtime components of setuptools, necessary to execute the software that requires pkg_resources.py. %package devel Summary: Download, install, upgrade, and uninstall Python packages Group: Development/Languages Requires: python-devel Requires: %{name} = %{version}-%{release} %description devel 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. This package contains the components necessary to build and install software requiring setuptools. %prep %setup -q -n %{srcname}-%{version} #find -name '*.txt' | xargs chmod -x #find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|' mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build cd 64bit python_64 setup.py build cd ../32bit python setup.py build #%check #python setup.py test %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT cd 64bit python_64 setup.py install --skip-build --root ${RPM_BUILD_ROOT} cd ../32bit python setup.py install --skip-build --root ${RPM_BUILD_ROOT} cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/*.txt 32bit/PKG-INFO %doc 32bit/docs/*.txt %{python_sitelib}/* %files devel %defattr(-,root,system,-) %doc 32bit/*.txt 32bit/PKG-INFO %doc 32bit/docs/*.txt %{python_sitelib}/easy_install* %{_bindir}/* /usr/bin/* %changelog * Wed May 25 2016 Ravi Hirekurabar - 0.9.8-2 - Updated to 0.9.8 * Thu Aug 12 2013 Tristan Delhalle - 0.9.8-1 - update and fix provides * Thu Jul 17 2013 Tristan Delhalle - 0.9.5-1 - update distribute 0.6.45 with setuptools 0.9.5 * Thu May 1 2013 Tristan Delhalle - 0.6.45-1 - updated to version 0.6.45 * Thu Nov 17 2011 Michael Perzl - 0.6.24-1 - updated to version 0.6.24 * Mon Jan 17 2011 Michael Perzl - 0.6.14-1 - first version for AIX V5.1 and higher