I’m trying to write a
setup.cfg equivalent) for a project that contains an executable compiled for the target archicture. I’m hoping to support:
- Creation of target-dependent wheels
- pip installing the project to trigger the executable to be compiled when wheels are unavailable
More details on the setup I’m trying to achieve:
setup.pyruns a compiler to create
- My project depends on this executable, running it via
subprocess.run(os.path.join(some_path, "my-executable"), where I’m unsure what
some_pathshould be (determined by
I believe this is effectively what’s being asked in Compiling & installing C executable using python's setuptools/setup.py? - Stack Overflow, but I’m not convinced by the solution there (and installing the executable to a venv’s bin directory isn’t particularly the goal for me - I’m expecting it to be internal to the project’s package).
The executable is written in Zig in my case, and I plan on using ziglang · PyPI as a build-time dependency to fetch the Zig compiler, although I believe my question would be effectively the same if the executable were written in C/Rust/… .
I was wondering if the expectation for things like this is to declare them as ‘extension modules’, but I couldn’t see an obvious way to do that in this case.
If anyone could provide any pointers for how to go about this it would be much appreciated