I'm trying to install a Python module that contains C modules. The C code relies on a library being available in the system's global install locations (/usr/include, /usr/lib), but in my case I only have a local installation of this lib available. Therefore, I would like to pass parameters (e.g., --incdir, --libdir) when calling "setup.py build" so that these values end up in the setup script.
Is there a way to achieve this?
I found out that prepending
CFLAGS="-I<local include dir>" LDFLAGS="-L<local lib dir>"
to the command line when calling setup.py did the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With