classification
Title: Building extensions with MSVC 2015 Express fails
Type: behavior Stage: resolved
Components: Distutils, Extension Modules, Windows Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: Sami Salonen, dstufft, eric.araujo, paul.moore, python-dev, steve.dower, tim.golden, vstinner, zach.ware
Priority: normal Keywords:

Created on 2015-12-12 21:20 by Sami Salonen, last changed 2016-01-26 13:10 by vstinner. This issue is now closed.

Messages (6)
msg256296 - (view) Author: Sami Salonen (Sami Salonen) Date: 2015-12-12 21:20
MSVC 2015 Express doesn't include the 64-bit compiler [1], and this causes distutils to fail to load proper compiler settings when using a 64-bit machine to compile extensions for 64-bit python. _msvccompiler.py tries to call "vcvarsall.bat amd64", but the VC\bin\amd64 directory contains only one file "vcmeta.dll".

[1] https://msdn.microsoft.com/en-us/library/hs24szh9(v=vs.140).aspx
msg256309 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-12-13 01:18
I'm inclined to close this as 'not a bug'.  There's not much we can do about that (if you want 64 bit extensions, you need a 64 bit compiler), and 2015 Community Edition does include the 64 bit compiler (if you select it).

I'm not sure if there's anything to be done in distutils to handle things more gracefully.
msg256313 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-12-13 03:08
There is: we can fall back on the cross compilers if the native ones are not there.

Not a huge change, and safe enough.
msg258406 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-01-16 20:41
New changeset fc117df27143 by Steve Dower in branch '3.5':
Issue #25850: Use cross-compilation by default for 64-bit Windows.
https://hg.python.org/cpython/rev/fc117df27143

New changeset 37dc870175be by Steve Dower in branch 'default':
Issue #25850: Use cross-compilation by default for 64-bit Windows.
https://hg.python.org/cpython/rev/37dc870175be
msg258408 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-01-16 20:43
For anyone interested, there's no issue with using the cross compilers even on a 64-bit system. The same code will be generated, the only difference is that the native 64-bit compilers can keep more in memory than the 32-bit cross compilers. For most Python extensions this won't matter (it matters for building huge projects like an operating system).
msg258955 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-01-26 13:10
test_distutils is now failing on "AMD64 Windows7 SP1 3.x" buildbot: please see issue #26207.
History
Date User Action Args
2016-01-26 13:10:03vstinnersetnosy: + vstinner
messages: + msg258955
2016-01-16 20:43:13steve.dowersetmessages: + msg258408
2016-01-16 20:41:48steve.dowersetstatus: open -> closed
versions: + Python 3.6
resolution: fixed
assignee: steve.dower
type: behavior
stage: resolved
2016-01-16 20:41:20python-devsetnosy: + python-dev
messages: + msg258406
2015-12-13 03:08:37steve.dowersetmessages: + msg256313
2015-12-13 01:18:38zach.waresetmessages: + msg256309
2015-12-12 21:20:25Sami Salonencreate