1 |
< |
### RPM external python 2.5.4 |
1 |
> |
### RPM external python 2.6.4 |
2 |
|
## INITENV +PATH PATH %i/bin |
3 |
|
## INITENV +PATH LD_LIBRARY_PATH %i/lib |
4 |
|
# OS X patches and build fudging stolen from fink |
5 |
+ |
%define closingbrace ) |
6 |
+ |
%define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo false;; esac) |
7 |
|
|
8 |
|
Requires: expat bz2lib db4 gdbm |
9 |
|
|
10 |
< |
%if "%cmsplatf" != "slc4onl_ia32_gcc346" |
10 |
> |
%if "%online" != "true" |
11 |
|
Requires: zlib openssl |
12 |
|
%endif |
13 |
|
|
54 |
|
#mkdir -p %i/include %i/lib |
55 |
|
mkdir -p %i/include %i/lib %i/bin |
56 |
|
|
57 |
< |
%if "%cmsplatf" != "slc4onl_ia32_gcc346" |
57 |
> |
%if "%online" != "true" |
58 |
|
%define extradirs $ZLIB_ROOT $OPENSSL_ROOT |
59 |
|
%else |
60 |
|
%define extradirs %{nil} |
124 |
|
perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/idle \ |
125 |
|
%{i}/bin/pydoc \ |
126 |
|
%{i}/bin/python-config \ |
127 |
< |
%{i}/bin/python2.5-config \ |
127 |
> |
%{i}/bin/2to3 \ |
128 |
> |
%{i}/bin/python2.6-config \ |
129 |
|
%{i}/bin/smtpd.py \ |
130 |
< |
%{i}/lib/python2.5/bsddb/dbshelve.py \ |
131 |
< |
%{i}/lib/python2.5/test/test_bz2.py \ |
132 |
< |
%{i}/lib/python2.5/test/test_largefile.py \ |
133 |
< |
%{i}/lib/python2.5/test/test_optparse.py |
130 |
> |
%{i}/lib/python2.6/bsddb/dbshelve.py \ |
131 |
> |
%{i}/lib/python2.6/test/test_bz2.py \ |
132 |
> |
%{i}/lib/python2.6/test/test_largefile.py \ |
133 |
> |
%{i}/lib/python2.6/test/test_optparse.py |
134 |
|
rm `find %{i}/lib -maxdepth 1 -mindepth 1 ! -name '*python*'` |
135 |
|
rm `find %{i}/include -maxdepth 1 -mindepth 1 ! -name '*python*'` |
136 |
|
|
137 |
+ |
%if "%online" == "true" |
138 |
|
# remove tkinter that brings dependency on libtk: |
135 |
– |
# |
136 |
– |
|
139 |
|
rm `find %{i}/lib -type f -name "_tkinter.so"` |
140 |
+ |
%endif |
141 |
|
|
142 |
|
# SCRAM ToolBox toolfile |
143 |
|
mkdir -p %i/etc/scram.d |
144 |
|
cat << \EOF_TOOLFILE >%i/etc/scram.d/%n |
145 |
|
<doc type=BuildSystem::ToolDoc version=1.0> |
146 |
|
<Tool name=%n version=%v> |
147 |
< |
<lib name=python2.5> |
147 |
> |
<lib name=python2.6> |
148 |
|
<Client> |
149 |
|
<Environment name=PYTHON_BASE default="%i"></Environment> |
150 |
|
<Environment name=LIBDIR default="$PYTHON_BASE/lib"></Environment> |
151 |
< |
<Environment name=INCLUDE default="$PYTHON_BASE/include/python2.5"></Environment> |
152 |
< |
<Environment name=PYTHON_COMPILE default="$PYTHON_BASE/lib/python2.5/compileall.py"></Environment> |
151 |
> |
<Environment name=INCLUDE default="$PYTHON_BASE/include/python2.6"></Environment> |
152 |
> |
<Environment name=PYTHON_COMPILE default="$PYTHON_BASE/lib/python2.6/compileall.py"></Environment> |
153 |
|
</Client> |
154 |
|
<use name=sockets> |
155 |
|
<Runtime name=PATH value="$PYTHON_BASE/bin" type=path> |