This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: msvccompiler.py using VC6 with Python 2.5a2
Type: Stage:
Components: Distutils Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: jretz, loewis, nnorwitz
Priority: high Keywords:

Created on 2006-06-18 07:11 by jretz, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
distutils.diff loewis, 2006-07-09 09:41
Messages (6)
msg28821 - (view) Author: Jimmy Retzlaff (jretz) Date: 2006-06-18 07:11
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.
msg28822 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-06-24 10:30
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.
msg28823 - (view) Author: Jimmy Retzlaff (jretz) Date: 2006-06-24 23:01
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.
msg28824 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-07-09 09:41
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?
msg28825 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-07-09 17:20
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}?
msg28826 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-07-14 04:56
Logged In: YES 
user_id=21627

Committed as r50509
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43518
2006-06-18 07:11:36jretzcreate