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 |
> |
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 |
|
|
125 |
– |
# SCRAM ToolBox toolfile |
126 |
– |
mkdir -p %i/etc/scram.d |
127 |
– |
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n.xml |
128 |
– |
<tool name="%n" version="%v"> |
129 |
– |
<lib name="python2.6"/> |
130 |
– |
<client> |
131 |
– |
<environment name="PYTHON_BASE" default="%i"/> |
132 |
– |
<environment name="LIBDIR" default="$PYTHON_BASE/lib"/> |
133 |
– |
<environment name="INCLUDE" default="$PYTHON_BASE/include/python2.6"/> |
134 |
– |
<environment name="PYTHON_COMPILE" default="$PYTHON_BASE/lib/python2.6/compileall.py"/> |
135 |
– |
</client> |
136 |
– |
<runtime name="PATH" value="$PYTHON_BASE/bin" type="path"/> |
137 |
– |
<use name="sockets"/> |
138 |
– |
</tool> |
139 |
– |
EOF_TOOLFILE |
140 |
– |
|
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"""|}' {} \; |
128 |
|
find %i -type f -perm -555 -name '*.py' -exec perl -p -i -e 'if ($. == 1) {s|^\'\'\'|#/usr/bin/env python\n\'\'\'|}' {} \; |
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 |
148 |
< |
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 |
158 |
– |
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 |
159 |
– |
%{relocateConfig}etc/scram.d/%n.xml |
145 |
|
%{relocateConfig}lib/python2.6/config/Makefile |
146 |
< |
|
162 |
< |
# Relocation for dependencies |
163 |
< |
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
164 |
< |
%{relocateConfig}etc/profile.d/dependencies-setup.csh |
165 |
< |
|
146 |
> |
%{relocateConfig}etc/profile.d/dependencies-setup.*sh |