Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue14708] distutils's checking for MSVC compiler

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

May 2, 2012, 8:10 PM

Post #1 of 6 (124 views)
Permalink
[issue14708] distutils's checking for MSVC compiler

New submission from jamesf <54740235 [at] qq>:

I am using python 2.7.2 installed via the pre-built installer package, and my SDK version is v7.1.

1) The MSSdk environment variable is not set by lastest SDK's SetEnv.cmd anymore, but distutils still check for it.

2) I have also install MSVC 2010 Express Edition, and its vcvarsall.bat
can't be found.

Off-side question:
a) Can i use different version of MSVC from which python is built for extension development ?
b) Can i use mingw compiler to develop extension for the pre-built windows binary python ?

----------
messages: 159833
nosy: jwfang
priority: normal
severity: normal
status: open
title: distutils's checking for MSVC compiler
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14708>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 2, 2012, 11:40 PM

Post #2 of 6 (112 views)
Permalink
[issue14708] distutils's checking for MSVC compiler [In reply to]

Changes by Antoine Pitrou <pitrou [at] free>:


----------
nosy: +loewis

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14708>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 2, 2012, 11:52 PM

Post #3 of 6 (126 views)
Permalink
[issue14708] distutils's checking for MSVC compiler [In reply to]

Martin v. Löwis <martin [at] v> added the comment:

> 1) The MSSdk environment variable is not set by lastest SDK's
> SetEnv.cmd anymore, but distutils still check for it.

This is intentional. Older SDKs still set the variable, so there
is nothing wrong with checking it.

> 2) I have also install MSVC 2010 Express Edition, and its
> vcvarsall.bat can't be found.

MSVC 2010 is not supported for building Python 2.7 extension modules.

> a) Can i use different version of MSVC from which python is built for
> extension development ?

No. Because of the way the MSVCRT works, this can cause crashes.

> b) Can i use mingw compiler to develop extension for the pre-built
> windows binary python ?

Yes, in principle. In practice, it may fail because of gcc limitations.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14708>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 3, 2012, 12:08 AM

Post #4 of 6 (114 views)
Permalink
[issue14708] distutils's checking for MSVC compiler [In reply to]

jamesf <54740235 [at] qq> added the comment:

Thanks for your replying.

Here is my understanding of how the compiler chosen logic works, correct me if i am wrong:
1) If using MSVC, we should ALWAYS stick the compiler to the version which python was compiled with;
2) But we can change SDK version through DISTUTILS_USE_SDK with SetEnv.cmd already called.
3) It's the compiler version that matters, not SDK version.

But from distutils source:

if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and ...:
^^^^^
does this mean i can not use lastest SDK since it does not set MSSdk variable?

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14708>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 3, 2012, 1:46 AM

Post #5 of 6 (108 views)
Permalink
[issue14708] distutils's checking for MSVC compiler [In reply to]

Martin v. Löwis <martin [at] v> added the comment:

DISTUTILS_USE_SDK really means "shut up, I know what I'm doing". So if this is the case (i.e. you *really* know what you are doing), just set MsSdk as well.

I don't actually know whether the latest SDK is able to build correct extensions for Python 2.7 - I haven't looked at the latest SDK. It may be that MS stopped setting MsSdk for a reason.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14708>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 3, 2012, 1:46 AM

Post #6 of 6 (110 views)
Permalink
[issue14708] distutils's checking for MSVC compiler [In reply to]

Martin v. Löwis <martin [at] v> added the comment:

In any case, it appears that there is no bug report in this issue, so I'm closing this as "works for me".

----------
resolution: -> works for me
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14708>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.