Embedding Python in a C++ self-contained executable

Grab the package from Nuget. There’s a direct download URL, which you can pretty easily calculate, and a .nupkg is just a ZIP file with more metadata.

Alternatively, you could make your build calculate the embeddable distro URL from its own version and download that one.

Unfortunately in both cases, you’ll need to know the micro version (unless you use nuget.exe to do the download) - you can’t just ask for “the latest 3.11” for example.

I can think of a few ways to streamline our set of installers that I’d kinda like to do, which would affect this. But I don’t really want to go breaking everyone until it’s all lined up in a way that isn’t going to be surprising, and also doesn’t leave us maintaining all the old packages forever. Probably when the next big “thing” happens in packaging I’ll revisit the distributions we provide on python.org, but we’re still waiting to see what that will be.

1 Like