modules, distutils does not understand that the build version of the
source tree is needed.
This patch fixes distutils.sysconfig to understand that the running
Python is part of the build tree and needs to use the appropriate
"shape" of the tree. This does not assume anything about the current
directory, so can be used to build 3rd-party modules using Python's
build tree as well.
This is useful since it allows us to use a non-installed debug-mode
Python with 3rd-party modules for testing. It as the side-effect that
set_python_build() is no longer needed (the hack which was added to
allow distutils to be used to build the "standard" extension modules).
This closes SF patch #547734.
modules and extensions on Windows is now $PREFIX/Lib/site-packages.
Includes backwards compatibility code for pre-2.2 Pythons. Contributed
by Paul Moore.
sys.prefix + 'config/Makefile'. When building Python for the first
time, these files aren't there, so the files from the build tree have
to be used instead; this file adds an entry point for specifying that
the build tree files should be used. (Perhaps 'set_python_build' should
should be preceded with an underscore?)
for done[n] can be integers as well as strings, but the code
concatenates them with strings (fixed by adding a str()) and calls
string.strip() on them (fixed by rearranging the logic)
(Presumably this wasn't noticed previously because parse_makefile()
was only called on Modules/Makefile, which contains no integer-valued
variables.)
in a string (gives you something to do with the dictionary returned
by 'parse_makefile()').
Pulled the regexes in 'parse_makefile()' out -- they're now globals,
as 'expand_makefile_vars()' needs (two of) them.
Cosmetic tweaks to 'parse_makefile()'.
all that work when someone asks for a "configuration variable" from the
Makefile. Details:
- added 'get_config_vars()': responsible for calling one of the
'_init_*()' functions to figure things out for this platform,
and to provide an interface to the resulting dictionary
- added 'get_config_var()' as a simple interface to the dictionary
loaded by 'get_config_vars()'
- changed the '_init_*()' functions so they load the global dictionary
'_config_vars', rather than spewing their findings all over
the module namespace
- don't delete the '_init_*()' functions when done importing
- adjusted 'customize_compiler()' to the new regime
sure it's imported! ;)
Re-wrap the docstrings on get_python_inc() and get_python_lib() to be
closer to the "normal" Python style. See GvR's "style guide" on the
essays page (http://www.python.org/doc/essays/).
There should never be a space between a function name and the '(' that
opens the argument list (see the style guide again).
the platform-neutral include dir by default and with Mac support.
Added 'get_python_lib()', inspired by 'get_python_inc()'.
Rewrote 'get_config_h_filename()' and 'get_makefile_filename()'
in terms of 'get_python_inc()' and 'get_python_lib()'.
Changed '_init_nt()' and '_init_mac()' to use 'get_python_inc()' and
'get_python_lib()' for directory names.