[Distutils] MSVC CRT woes
mhammond at skippinet.com.au
Thu Feb 5 17:23:11 EST 2004
> Since wininst.exe dynamically loads the Python dll (even different
> versions), it is already fairly limited in the Python api it can use.
> Avoiding the call to PyRun_SimpleFile is still an option.
> Isn't it fun to break the rules ;-) ?
I did find a couple of other issues with breaking these rules:
* PyRun_SimpleFile does not allow you to specify the "filename", so
tracebacks indicate "<string>". To get a filename means using additional
"compile" functions too.
* redirection of stdout/stderr don't work. wininst.exe sets *its*
stdout/stderr OK, but Python itself is using a *different* stdout/stderr, so
the reopen has no effect.
Multiple exes may turn out to be less hassle in the long run (except for the
person who needs to build wininst_vc6.exe and wininst_vc7.exe)
And re the other thread about MSVC7 directories: I will update the patch to
falling back to the registry to try and locate this directory - this seems
like a reasonable approach, and should work in almost all cases.
More information about the Distutils-SIG