This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Windows embeddable distribution doesn't ship headers
Type: Stage: resolved
Components: Build, Windows Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: paul.moore, steve.dower, tim.golden, touilleMan, zach.ware
Priority: normal Keywords:

Created on 2019-09-19 09:42 by touilleMan, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg352778 - (view) Author: Leblond Emmanuel (touilleMan) * Date: 2019-09-19 09:42
I don't understand why the headers are not provided as part of the distribution.

It would be really easy to rm them once the distribution extracted for usecases that don't need them.

On the other hand, usecases that need them cannot just download the Include folder from the CPython git repository given they get cooked during the build phase.

It's also really inconvenient to extract the headers from the executable distribution.

From my personal experience, this prevented me from using the distribution each time it would have been a good fit for my need:
- Embedding CPython into the Godot game engine (see https://github.com/touilleMan/godot-python/blob/284f092d9f7893403f7af32cac5978532c0e7d21/platforms/windows-64/SCsub#L55-L62)
- Providing a frozen distribution of python for a script with simple .exe binary that would initialize the CPython insterpeter and run a simple "import mymodule; mymodule.main()" command
msg352807 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-19 17:16
The embeddable distro is meant to be a "redistributable" for end-user machines, rather than a development kit. "Build" and "distribution" are two clearly separated tasks (at least on Windows), and so they have different dependencies. We won't be adding headers to the embeddable distro.

To get the headers, you'll either want the regular installer or the package from https://www.nuget.org/packages/python (or pythonx86). Or you can grab the Include folder from git, provided you use PC/pyconfig.h and the correct tag, as none of the files are "cooked" on Windows.

To directly address your two examples:
- the linked SCons script is a build script, which should be run on a build machine against a development kit. But when you copy the built result to another machine, they'll only require the embeddable distro at runtime
- the "frozen" distribution will need the new .exe binary to be built against a development kit. But when you copy the built result to another machine, they'll only require the embeddable distro at runtime.
History
Date User Action Args
2022-04-11 14:59:20adminsetgithub: 82405
2019-09-19 17:16:09steve.dowersetstatus: open -> closed
resolution: rejected
messages: + msg352807

stage: resolved
2019-09-19 09:42:05touilleMancreate