How to organize and distribute a Python Application with C extensions?
-
12-11-2019 - |
Question
I'm working on a Python application that is distributed as source (zipped) and via py2exe (majority).
Now I want to speed up some modules by replacing them with C extensions. Which works quite well for the development part. But the distribution and organization gives me a headache...
My current structure looks like this:
.
|-- py_submodule_a/
|-- py_submodule_b/
| |-- c_extension_ba/
|-- c_extension_x/
|-- setup.py
|-- main.py
My question is, where should I place the setup calls/files for my C extensions? I want to make sure that I can always run my application via main.py
(so I'd rather not wait until distribution to compile the C extensions) but I also want to make sure that the distribution always has the latest C extensions.
Thanks in advance for any help!
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow