Coming to you in build 53 of OpenSolaris is 64-bit Python, which I worked on with Laszlo Peter of
JDS fame. This means Python modules can make use of 64-bit versions of libraries, as well as 64-bit
plugins. You can run the 64-bit version of Python via the path /usr/bin/amd64/python (on x86).
This path isn't quite set in stone yet, so don't rely on it.
This facility didn't previously exist on any OS, so we had to make some innovations in terms of how Python
lets modules build and load. In particular the Makefile used by Python previously hard-coded certain
compiler flags etc. We had to make this dynamic. Also, we had to make some modifications to where Python
looks for .so files when loading modules. Previously it would just assume that, say,
/usr/lib/python2.4/foo.so was of the correct word size. Now, if it's running 64-bit, it will look
for /usr/lib/python2.4/64/foo.so.
Similarly, building a Python module using the 64-bit Python will automagically install the .so file
in the right place. Thanks to their architecture-independence, we don't need the same tricks for the .pyc
files.
The need for this arose from the continuing work on Solaris dom0's running under Xen. The kernel/hypervisor interfaces
provided are not 64-bit clean in the sense that 32-bit tools cannot deal with 64-bit domains; as a result, we need
to run (the Python-based) xend as a native binary.
As an added bonus, Laca has also upgraded to Python 2.4.4, which finally enables the curses module on Solaris;
also fixed are some niggling problems with accidental regeneration of .pyc files.
Tags: Xen OpenSolaris Python
Trackback URL: http://blogs.sun.com/levon/entry/64-bit_python_in_nevada_build