ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/py2-setuptools.spec
Revision: 1.2
Committed: Thu Jul 15 10:26:20 2010 UTC (14 years, 9 months ago) by diego
Branch: MAIN
CVS Tags: builder_2010-10-13_13-04-14_dbs-apps, builder_2010-10-13_12-53-04_dbs-web, HG1009c, builder_2010-09-15_18-10-44_dbs-apps, HG1009b, HG1009a, dg-base-rev21, dg-base-rev20, dg-base-rev19, dg-base-rev18, dg-base-rev17, dg-base-rev16, ge20100722-rpm-osx-64-bit
Changes since 1.1: +21 -3 lines
Log Message:
fixed sourcing dependencies; fixed static paths to python

File Contents

# User Rev Content
1 valya 1.1 ### RPM external py2-setuptools 0.6c9
2 diego 1.2 ## INITENV +PATH PATH %i/bin
3 valya 1.1 ## 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
6     Requires: python
7     %prep
8     %setup -n setuptools-%realversion
9     %build
10     %install
11 diego 1.2 export PYTHONPATH=$PYTHONPATH:%i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
12 valya 1.1 mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages
13 diego 1.2 python setup.py install --prefix=%i
14 valya 1.1
15 diego 1.2 # 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 valya 1.1