[FR] Add support for building exes using C source files.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
What's the problem this feature will solve?
I would like to have setuptools be used to build exes for my package that are built as follows:
- 1 that embeds python and defines
Py_LIMITED_APIfor version 3.9 as the API baseline. - 1 exe that does not embed python but acts as an SFX exe for the embedded python interpreter.
I basically then have to later on take this setup.py and use it to build the exe's with 3.14.2-32, 3.14.2-64, and 3.14.2-arm64 via github actions (the versions listed use the python install manager version formatting).
I could then use meson-python for the main project (after using setuptools) on a job after building the exes which downloads the built exe artifacts and packs all of them into the x86, x64, and the arm64 wheels. This is because the user could request my package to build an embedded python for those specific CPU architectures for which I must support even if their CPU is not arm64 (even if it is x64 or even x86).
Having this support built in would make deployment much easier for me as well.
Describe the solution you'd like
The solution is for a module that is meant to build exe's similar to the Extension class that exists in setuptools.extension except it allows one to build the exe using a C/C++ compiler, provide macros, provide the libraries to target, as well as the include & library directories.
The type could default also add the python include and library directories for the user just like with Extension.
Alternative Solutions
I currently use meson-python for this as well, but it does not let me to directly write the exe files to my dist\ folder without it deleting the temp build directory with the build output folder where the exe's are output into without simply extracting them from the wheels.
Additional context
I am not sure this needs any additional context as I tried to provide as much context as possible above. Let me know if more information is actually needed.
Code of Conduct
- I agree to follow the PSF Code of Conduct
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading setuptools.extension.Extension and the existing setup.py/build flow to understand how compiler options, macros, libraries, and include and library directories are represented. The issue names no target files or tests; done would mean a comparable module can build the requested embedded and SFX executables and place their outputs in dist.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100