0

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.

sinoroc
  • 18,409
  • 2
  • 39
  • 70
Mala
  • 14,178
  • 25
  • 88
  • 119
  • 1
    Maybe the job is already done and you can depend on it: https://pypi.org/project/pyshoco/ – sinoroc Aug 11 '22 at 21:40
  • That would have been a lot more convenient, but unfortunately the package segfaults in my experimentation. As such, I wrote my own bindings. – Mala Aug 11 '22 at 22:12

0 Answers0