classification
Title: Statically link vcruntime140.dll
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: paul.moore, python-dev, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2015-06-19 17:48 by steve.dower, last changed 2015-08-08 16:04 by steve.dower. This issue is now closed.

Files
File name Uploaded Description Edit
24476_1.patch steve.dower, 2015-06-19 17:49 review
Messages (9)
msg245511 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-06-19 17:48
It's possible to statically link the vcruntime140.dll dependency without statically linking the entire CRT, which will save us from having to redistribute the file (meaning the entire CRT dependency is now system components).

Patch to follow, and I'm very +1 on this, but didn't want to skip the chance for people to raise concerns or questions.
msg245518 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2015-06-19 19:47
+1 from me on this. Are there any specific technical implications (in terms of ease of interoperability, ability to use a different compiler to build Python, or whatever)? Whether there are or not, I'm still in favour - I think it's a good thing anyway on general principles.
msg245521 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-06-19 19:54
There may be some potential issues when hosting Python in a C++ app built with a later version of MSVC, since vcruntime140.dll is predominantly initialization and exceptions for C++. I can't think of anything specific here though, and it seems likely that the host's initialization code would apply for the host. The C Runtime doesn't rely on anything initialized here as far as I know - it's only the C++ libraries.

Shouldn't be any other implications other than slightly easier distribution and slightly larger file sizes. (Haven't actually checked how much larger, but it is no more than 10s of KB which I consider acceptable.)
msg245523 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-06-19 19:58
As long as a clean (updated) install of Vista, 7, 8, or 10 can download the installer, run it, and run Python without having to do anything else, I'm good with it.
msg245526 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2015-06-19 20:04
Cool. Easier distribution is good. Better compatibility with GPL requirements (depending only on "system facilities") is probably helpful for the general community, too.

Embedding in C++ built with a different version of the compiler is always going to be a fun exercise - I can't see this change as making things worse, even if it doesn't end up helping either.

I'm guessing that this specific change won't make much difference to embedding in general - it's the move to the universal CRT that mitigates the worst of the "don't mix C runtimes" issues, rather than this specific change?

Anyway, it's all steps in a positive direction, so that's good.
msg245527 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-06-19 20:08
> it's the move to the universal CRT that mitigates the worst of the "don't mix C runtimes" issues, rather than this specific change?

Correct
msg245528 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-06-19 20:09
New changeset 56ea535a8047 by Steve Dower in branch '3.5':
Issue 24476: Statically links vcruntime140.dll and removes it from the installer
https://hg.python.org/cpython/rev/56ea535a8047

New changeset c0827842102e by Steve Dower in branch 'default':
Issue 24476: Statically links vcruntime140.dll and removes it from the installer
https://hg.python.org/cpython/rev/c0827842102e
msg247557 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-07-29 04:24
Reopening this because we need to update distutils to pass the same options or built wheels won't work on machines where the full VC runtime isn't installed.
msg248278 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-08-08 16:04
Fixed this, and forgot I had a bug open for it so I didn't reference it from the commit.
History
Date User Action Args
2015-08-08 16:04:48steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg248278

stage: resolved
2015-07-29 04:24:37steve.dowersetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg247557

stage: resolved -> (no value)
2015-06-19 20:09:50steve.dowersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2015-06-19 20:09:28python-devsetnosy: + python-dev
messages: + msg245528
2015-06-19 20:08:06steve.dowersetmessages: + msg245527
2015-06-19 20:04:26paul.mooresetmessages: + msg245526
2015-06-19 19:58:44zach.waresetmessages: + msg245523
2015-06-19 19:54:06steve.dowersetmessages: + msg245521
2015-06-19 19:47:41paul.mooresetmessages: + msg245518
2015-06-19 17:49:40steve.dowersetfiles: + 24476_1.patch
keywords: + patch
2015-06-19 17:48:25steve.dowercreate