ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/py2-setuptools.spec
(Generate patch)

Comparing COMP/CMSDIST/py2-setuptools.spec (file contents):
Revision 1.1 by valya, Tue Feb 3 22:06:02 2009 UTC vs.
Revision 1.2 by diego, Thu Jul 15 10:26:20 2010 UTC

# Line 1 | Line 1
1   ### RPM external py2-setuptools 0.6c9
2 < %define pythonv %(echo $PYTHON_VERSION | cut -f1,2 -d.)
2 > ## INITENV +PATH PATH %i/bin
3   ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
4  
5   Source: http://pypi.python.org/packages/source/s/setuptools/setuptools-%realversion.tar.gz
# Line 8 | Line 8 | Requires: python
8   %setup -n setuptools-%realversion
9   %build
10   %install
11 + export PYTHONPATH=$PYTHONPATH:%i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
12   mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
13 < python setup.py build
13 < mv build/lib/* %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
13 > python setup.py install --prefix=%i
14  
15 + # Fixed static paths to python
16 + perl -p -i -e "s|#!.*/python|#!/usr/bin/env python|" %i/bin/*
17 +
18 + # This will generate the correct dependencies-setup.sh/dependencies-setup.csh
19 + # using the information found in the Requires statements of the different
20 + # specs and their dependencies.
21 + rm -rf %i/etc/profile.d
22 + mkdir -p %i/etc/profile.d
23 + for x in %pkgreqs; do
24 +  case $x in /* ) continue ;; esac
25 +  p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/')
26 +  echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
27 +  echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
28 + done
29 +
30 + %post
31 + %{relocateConfig}etc/profile.d/dependencies-setup.sh
32 + %{relocateConfig}etc/profile.d/dependencies-setup.csh
33  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines