Skip to content
This repository has been archived by the owner on Mar 29, 2019. It is now read-only.

Commit

Permalink
Bug 584947: Added specs of simplejson and setuptools for python 2.5.x…
Browse files Browse the repository at this point in the history
…. r=bhearsum
  • Loading branch information
Rail Aliev committed Aug 11, 2010
1 parent 8443794 commit edb0675
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
52 changes: 52 additions & 0 deletions setuptools-py25/centos5-i686/setuptools-py25.spec
@@ -0,0 +1,52 @@
%define _python /tools/python-2.5.1/bin/python
%{!?python_sitelib: %define python_sitelib %(%{_python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name: python25-setuptools
Version: 0.6c5
Release: 2%{?dist}moz1
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}.tar.gz
Source1: psfl.txt
Source2: zpl.txt
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

#BuildArch: noarch
Requires: python25

%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}
chmod -x *.txt
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{_python}|'


%build
CFLAGS="$RPM_OPT_FLAGS" %{_python} setup.py build_ext


%install
rm -rf $RPM_BUILD_ROOT
%{_python} setup.py install --root=$RPM_BUILD_ROOT
install -p -m 0644 %{SOURCE1} %{SOURCE2} .
find $RPM_BUILD_ROOT%{python_sitelib} -name '*.exe' | xargs rm -f
find $RPM_BUILD_ROOT%{python_sitelib} -name '*.txt' | xargs chmod -x
chmod +x $RPM_BUILD_ROOT%{python_sitelib}/setuptools/command/easy_install.py


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc *.txt
/tools
1 change: 1 addition & 0 deletions setuptools-py25/centos5-x86_64/setuptools-py25.spec
31 changes: 31 additions & 0 deletions simplejson-py25/centos5-i686/simplejson-py25.spec
@@ -0,0 +1,31 @@
Name: simplejson-py25
Summary: simplejson-py25
Version: 2.1.1
Release: 0moz1
License: ???
Group: Python
Source: http://pypi.python.org/packages/source/s/simplejson/simplejson-%version.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: python25

%define _python /tools/python-2.5.1/bin/python

%description
%{name}

%prep
%setup -q -n simplejson-%{version}

%build
%{_python} setup.py build_ext

%install
rm -rf $RPM_BUILD_ROOT
%{_python} setup.py install --root=$RPM_BUILD_ROOT

%clean
rm -fr $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
/tools
1 change: 1 addition & 0 deletions simplejson-py25/centos5-x86_64/simplejson-py25.spec

0 comments on commit edb0675

Please sign in to comment.