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

Comparing COMP/CMSDIST/python.spec (file contents):
Revision 1.63 by diego, Thu Feb 25 13:47:04 2010 UTC vs.
Revision 1.68 by lat, Fri Sep 10 16:25:11 2010 UTC

# Line 116 | Line 116 | perl -p -i -e "s|^#!.*python|#!/usr/bin/
116                      %{i}/lib/python2.6/test/test_bz2.py \
117                      %{i}/lib/python2.6/test/test_largefile.py \
118                      %{i}/lib/python2.6/test/test_optparse.py
119 rm  `find %{i}/lib -maxdepth 1 -mindepth 1 ! -name '*python*'`
120 rm  `find %{i}/include -maxdepth 1 -mindepth 1 ! -name '*python*'`
119  
120 < %if "%online" == "true"
120 > find %{i}/lib -maxdepth 1 -mindepth 1 ! -name '*python*' -exec rm {} \;
121 > find %{i}/include -maxdepth 1 -mindepth 1 ! -name '*python*' -exec rm {} \;
122 >
123   # remove tkinter that brings dependency on libtk:
124   find %{i}/lib -type f -name "_tkinter.so" -exec rm {} \;
125 %endif
126
127 # SCRAM ToolBox toolfile
128 mkdir -p %i/etc/scram.d
129 cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
130 <doc type=BuildSystem::ToolDoc version=1.0>
131 <Tool name=%n version=%v>
132 <lib name=python2.6>
133 <Client>
134 <Environment name=PYTHON_BASE default="%i"></Environment>
135 <Environment name=LIBDIR default="$PYTHON_BASE/lib"></Environment>
136 <Environment name=INCLUDE default="$PYTHON_BASE/include/python2.6"></Environment>
137 <Environment name=PYTHON_COMPILE default="$PYTHON_BASE/lib/python2.6/compileall.py"></Environment>
138 </Client>
139 <use name=sockets>
140 <Runtime name=PATH value="$PYTHON_BASE/bin" type=path>
141 </Tool>
142 EOF_TOOLFILE
125  
126   # Makes sure that executables start with /usr/bin/env perl and not with comments.
127   find %i -type f -perm -555 -name '*.py' -exec perl -p -i -e 'if ($. == 1) {s|^"""|#/usr/bin/env python\n"""|}' {} \;
# Line 147 | Line 129 | find %i -type f -perm -555 -name '*.py'
129   find %i -type f -perm -555 -name '*.py' -exec perl -p -i -e 'if ($. == 1) {s|/usr/local/bin/python|/usr/bin/env python|}' {} \;
130   rm -f %i/share/doc/python/Demo/rpc/test
131  
132 < # Setups dependencies environment
151 < rm -rf %i/etc/profile.d
132 > # Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment.
133   mkdir -p %i/etc/profile.d
134 < for x in %pkgreqs; do
135 <  case $x in /* ) continue ;; esac
136 <  p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/')
137 <  echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
138 <  echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
134 > : > %i/etc/profile.d/dependencies-setup.sh
135 > : > %i/etc/profile.d/dependencies-setup.csh
136 > for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do
137 >  root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root
138 >  if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then
139 >    echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
140 >    echo "test X\$$root != X || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
141 >  fi
142   done
143  
144   %post
161 find $RPM_INSTALL_PREFIX/%pkgrel/lib -type l | xargs ls -la | sed -e "s|.*[ ]\(/.*\) -> \(.*\)| \2 \1|;s|[ ]/[^ ]*/external| $RPM_INSTALL_PREFIX/%cmsplatf/external|g" | xargs -n2 ln -sf
162 %{relocateConfig}etc/scram.d/%n
145   %{relocateConfig}lib/python2.6/config/Makefile
146 <
165 < # Relocation for dependencies
166 < %{relocateConfig}etc/profile.d/dependencies-setup.sh
167 < %{relocateConfig}etc/profile.d/dependencies-setup.csh
168 <
146 > %{relocateConfig}etc/profile.d/dependencies-setup.*sh

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines