I have a python library that I'm trying to package into something pip-installable. It depends upon a C library (shoco). I'd like to avoid packaging the actual source code to shoco in my own package if possible.
I found a solution here, but it seems this does not work with modern Python packaging (i.e. via python -m build
). In particular, the pre-install script seems not to run until after the installation is complete, and as a result gcc
fails because the C files to compile aren't there yet.
Is there a reasonable way of including "git clone this repo then compile it" into the pip-install process for a package? I'd like to avoid copying the shoco source code directly into my source tree if possible.