122 |
|
# remove tkinter that brings dependency on libtk: |
123 |
|
find %{i}/lib -type f -name "_tkinter.so" -exec rm {} \; |
124 |
|
|
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 |
– |
|
125 |
|
# Makes sure that executables start with /usr/bin/env perl and not with comments. |
126 |
|
find %i -type f -perm -555 -name '*.py' -exec perl -p -i -e 'if ($. == 1) {s|^"""|#/usr/bin/env python\n"""|}' {} \; |
127 |
|
find %i -type f -perm -555 -name '*.py' -exec perl -p -i -e 'if ($. == 1) {s|^\'\'\'|#/usr/bin/env python\n\'\'\'|}' {} \; |
139 |
|
done |
140 |
|
|
141 |
|
%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 |
142 |
|
%{relocateConfig}lib/python2.6/config/Makefile |
161 |
– |
|
162 |
– |
# Relocation for dependencies |
143 |
|
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
144 |
|
%{relocateConfig}etc/profile.d/dependencies-setup.csh |
145 |
|
|