Run Python scripts in sb2 Environment
Http://lists.scratchbox.org/pipermail/scratchbox-users/2009-September/001533.html
Http://lists.scratchbox.org/pipermail/scratchbox-users/2008-September/001346.html
If you don't want the python to be present in the target filesystem, you 'd better off compiling it as a host tool (with the host-GCC toolchain) and installing it into/host_usr inside scratchbox. just note that you'll need to set/host_usr/bin into your path and possibly/host_usr/lib/python2.5 in pythonpath.
If you do not want python to be in target, you 'd better compile it with host-GCC and then follow the instructions in the/host_usr directory
Http://lists.scratchbox.org/pipermail/scratchbox-users/2005-May/000248.html
See/scratchbox/doc/variables.txt for more information about controlling the binary redirector (the sbox_redirect _ * variables ). if you want to replace scratchbox's Python for building purposes, you shoshould make it a host tool by building it with host-GCC and installing it (for example) under/host_usr.
Switch to [sbox-Host: ~] > Medium
Apt-Get install python2.6
CP-a python related to/host_usr
Dpkg-l python2.6
Mkdir/host_usr/lib
CP/usr/bin/Py *-A/host_usr/bin/
CP/usr/bin/2to3-2.6-A/host_usr/bin/
CP/usr/bin/pdb2.6/host_usr/bin/(for Debug)
CP-A/usr/lib/python2.6/host_usr/lib/
Switch to Marvell
[Sbox-Marvell: ~] > Python2.6
/Host_usr/bin/python2.6: Error while loading shared libraries: libssl. so.0.9.8: cannot open shared object file: no such file or directory
Switch back to host
[Sbox-Host: ~] > Which python2.6
/Host_usr/bin/python2.6
[Sbox-Host: ~] > LDD/host_usr/bin/python2.6
Libpthread. so.0 =>/lib/libpthread. so.0 (0x005a2000)
Libdl. so.2 =>/lib/libdl. so.2 (0x00634000)
Libutil. so.1 =>/lib/libutil. so.1 (0x00f0c000)
Libssl. so.0.9.8 =>/usr/lib/i686/cmov/libssl. so.0.9.8 (0x0041e000)
Libcrypto. so.0.9.8 =>/usr/lib/i686/cmov/libcrypto. so.0.9.8 (0x0021a000)
Libz. so.1 =>/usr/lib/libz. so.1 (0x0074a000)
Libm. so.6 =>/lib/libm. so.6 (0x00110000)
Libc. so.6 =>/lib/libc. so.6 (0x0075e000)
/Lib/ld-linux.so.2 (0x00b4a000)
[Sbox-Host: ~] >
[Sbox-Host: ~] > Ls/usr/lib/i686/cmov/
Libcrypto. so.0.9.8 libssl. so.0.9.8
The two databases are all copied.
[Sbox-Host: ~] > Mkdir/host_usr/lib/i686/cmov-P
[Sbox-Host: ~] > CP-A/usr/lib/i686/cmov/*/host_usr/lib/i686/comv
[Sbox-Host: ~] >
Switch to Marvell
[Sbox-Marvell: ~] > Export LD_LIBRARY_PATH =/host_usr/lib/i686/cmov/: $ LD_LIBRARY_PATH
[Sbox-Marvell: ~] > Python2.6
/Host_usr/bin/python2.6: Error while loading shared libraries: libssl. so.0.9.8: cannot open shared object file: no such file or directory
Fainted. Why?