Steve Dower added the comment:

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.

----------
keywords: +patch
Added file: http://bugs.python.org/file40410/25027_1.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25027>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to