[Bf-python] Building python with builtin modules
Chris Want
cwant at ualberta.ca
Fri Sep 3 16:03:02 CEST 2004
> Python 2.3.3, Windows ME (should be the same for other win versions):
>
> ('__builtin__', '__main__', '_codecs', '_hotshot', '_locale', '_random',
> '_weakref', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO',
> 'cmath', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools',
> 'marshal', 'math', 'md5', 'msvcrt', 'nt', 'operator', 'pcre', 'regex',
> 'rgbimg', 'rotor', 'sha', 'signal', 'strop', 'struct', 'sys', 'thread',
> 'time', 'xreadlines', 'xxsubtype', 'zipimport')
>
> Got it using this:
> import sys
> prints sys.builtin_module_names
>
> The Python modules Python23.zip (and the zlib.pyd dll) included with
> Blender 2.34 for windows are also "basic" modules that should be
> available, they are under cvs now. Some are specific to the platform,
> like nt and msvcrt, just forget them. The official documentation tells
> which are platform-specific or not when you're in doubt. If you try the
> above commands on another platform you'll see that Python for win comes
> with many additional modules that are built shared elsewhere, where
> Python is more common.
Hmmm ... I wasn't aware that you had to distribute the
modules in a separate package. I'm surprised I don't
see 'socket' in your list, as I would think that would
be an important one.
> BTW, might be useful info: at least on linux a new Python installation
> goes to /usr/local and lives nicely with the already installed one, you
> just need to tell Blender where the Python you want is, by setting a
> system var, like PYTHON="/usr/local/bin/python2.3". This works to
> compile Blender and should also work for running pre-compiled versions,
> tested with 2.32.
I use the --prefix setting of autoconf when building python along
with the NAN_PYTHON variable when building blender (make).
Chris
More information about the Bf-python
mailing list