Patch to distutils.msvccompiler, 2.3 branch

Several people on this list (IIRC Jim, Guido, Jeremy) have been bitten by the problem that distutils couldn't build extensions with MSVC6, complaining that the compiler isn't installed although in fact it was installed. The problem always seemed to be that MSVC6 only writes the complete registry entries which distutils requires after the GUI has been run at least one time. I have uploaded a patch to the latest bug report from Jim, http://www.python.org/sf/848614, which tries to detect these incomplete registry entries. It works for me (having removed and installed MSVC several times, with and without running the gui). It would be great if someone else would try it out and report if it works correctly - IMO it should be commited to the 2.3 maintanance branch before 2.3.3 goes out. (Suggestions for better wording would be accepted ;-) The effect of this patch would be the folling outputs from a 'setup.py build_ext' command, depending on the compiler installation state: Not installed: error: Python was built with version 6 of Visual Studio, and extensions need to be built with the same version of the compiler, but it isn't installed. Installed, but the GUI has never been run: warning: It seems you have Visual Studio 6 installed, but the expected registry settings are not present. You must at least run the Visual Studio GUI once so that these entries are created. error: Python was built with version 6 of Visual Studio, and extensions need to be built with the same version of the compiler, but it isn't installed. Installed, and GUI has been run: the extension should build normally. Thanks, Thomas

"Thomas Heller" <theller@python.net> wrote in message news:brqx615o.fsf@python.net...
In my view, distutils is correct. VC6 has been loaded but installation is not finished.
I have seen other programs (some games, in particular, that I remembert) do this sort of thing -- do final installation phase on first execution. Sometimes there is a menu option to repeat this phase without reloading.
Not installed:
I would call this 'Not loaded'
error: Python was built with version 6 of Visual Studio, and extensions need to be built with the same version of the compiler,
but
it isn't installed.
Installed, but the GUI has never been run:
and this 'Loaded, but installation incomplete'
Installed, and GUI has been run: the extension should build normally.
and this 'Fully installed' Terry J. Reedy

"Thomas Heller" <theller@python.net> wrote in message news:brqx615o.fsf@python.net...
In my view, distutils is correct. VC6 has been loaded but installation is not finished.
I have seen other programs (some games, in particular, that I remembert) do this sort of thing -- do final installation phase on first execution. Sometimes there is a menu option to repeat this phase without reloading.
Not installed:
I would call this 'Not loaded'
error: Python was built with version 6 of Visual Studio, and extensions need to be built with the same version of the compiler,
but
it isn't installed.
Installed, but the GUI has never been run:
and this 'Loaded, but installation incomplete'
Installed, and GUI has been run: the extension should build normally.
and this 'Fully installed' Terry J. Reedy
participants (3)
-
martin@v.loewis.de
-
Terry Reedy
-
Thomas Heller