The change in revision 42515 checks if MSSdk is defined, and if so it will "Assume that the SDK set up everything alright." The problem is that the SDK may be set up for a different version of cl.exe than is expected. In my case I have VC6 and VC7.1 installed and the SDK is set up for VC6. When building extensions for Python 2.5a2, distutils tries to use VC6 in my case.
Logged In: YES user_id=21627 I don't understand the problem. MSSdk gets defined by opening a specific SDK build environment. Just don't open that build environment, but open a regular cmd.exe window, and it should work fine.
Logged In: YES user_id=101588 There is an option when installing VC (or at least there used to be, I haven't checked lately) to set the environment variables to take effect system wide. This is useful in that the build environment is always available at any command line (and they are also set when I build from my editor which is not VS). I've left mine pointed at VC6 as I typically do standalone DLLs using VC6 so they are easier to redistribute. Distutils has always selected the right version so it hasn't been an issue for me when working on Python things before. The issue wouldn't be as difficult if the resulting behavior were more obvious. Unfortunately the initial errors in my case were syntax errors arising from macro definitions that changed between VC6 and VC7.1. Most of the time I spent updating py2exe to work with 2.5 was spent on diagnosing this. It wasn’t helped by the fact that I had a blind spot regarding the compiler version. I use a batch file to build py2exe for 2.3, then 2.4, and finally 2.5. Since 2.3 and 2.4 were building fine I didn’t even consider the idea of the wrong compiler version being used for quite a while. For now I just do "set MSSDK=" before building and then everything works just fine.
Logged In: YES user_id=21627 Here is a proposed patch: in addition to requiring MSSdk to be set, distutils would also require DISTUTILS_USE_SDK to be set. Neal, can you please approve this new feature before beta 2?
Logged In: YES user_id=33168 Martin, this looks fine if you think it's important. Don't forget to add a Misc/NEWS entry. There are some typos in the doc: chose -> choose "most be both set" -> "must both be set" Should the last distutils in the doc be: \module{distutils}?