Author steve.dower
Recipients cgohlke, larry, paul.moore, skrah, steve.dower, tim.golden, zach.ware
Date 2015-09-08.17:04:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441731898.05.0.568578222761.issue25027@psf.upfronthosting.co.za>
In-reply-to
Content
Attached a fix for distutils that will include the required vcruntime DLL with the extension.

This is purely Python source code and only needs to be patched on the build machine.

I have tested with a numpy build from source (setup.py bdist_wheel) and it works correctly on a clean Win7 machine with only a Python 3.5.0rc3 install.

When multiple vcruntime###.dll files are available, the first one that is loaded wins. This means that if you can guarantee a particular import occurs first, you can omit the DLL elsewhere in your package. There is no way to determine this automatically, 

Because of the way I wrote the patch, if you build with DISTUTILS_USE_SDK set, you will get the old static linking unless you also define PY_VCRUNTIME_REDIST to the path of the file to include. If the redist file cannot be found (you probably don't have the compiler either, but assuming you do), you will get the old static linking. I think this is the right balance of "works-by-default" and "I know what I'm doing let me control it" (though now I put them next to each other, I could rename the variable to DISTUTILS_VCRUNTIME_REDIST).

Will work up a test for it, but wanted to get feedback on the approach first.
History
Date User Action Args
2015-09-08 17:04:58steve.dowersetrecipients: + steve.dower, paul.moore, larry, tim.golden, cgohlke, skrah, zach.ware
2015-09-08 17:04:58steve.dowersetmessageid: <1441731898.05.0.568578222761.issue25027@psf.upfronthosting.co.za>
2015-09-08 17:04:58steve.dowerlinkissue25027 messages
2015-09-08 17:04:57steve.dowercreate