"import as" is in compatible to python 2.6
Brought to you by:
hvengel
we try to include as.py but "as" is a keyword
scons: Reading SConscript files ...
Looking for build directory for platform 'linux2'
Exact match not found, finding closest guess
Found directory build/linux, will build there
/home/st/lprof-1.11.4.1/scons-local-0.96.91/SCons/Platform/posix.py:37: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
import popen2
File "/home/st/lprof-1.11.4.1/scons-local-0.96.91/SCons/Tool/gas.py", line 36
import as
The easiest way to fix this is to update the copy of scons that is included to a newer version. If you have scons installed on your computer, you can copy all the necessary files. In my case, most of the files were in /usr/lib.
1. Copy libraries from computer to lprof. For me, I had to copy /usr/lib/scons-1.2.0 to the lprof folder.
2. I renamed it to scons-local-1.2.0
3. Delete scons-local-0.96.91 folder
4. Replace scons.py and sconsign.py with newer versions. These two files are probably in /usr/bin. (Depending on which Linux distro you use, these may have been renamed to scons and sconsign. Just make sure that they have .py extension on them when you place them into the lprof folder.)
This was all it took to get it working on both my computers (running Gentoo Linux, 64bit on one, 32bit on the other).
Hope this helps.
I renamed the as module as 'ass' and all module calls in gas.py, asmxxx.py and it worked fine too.