I have a project which is mostly written in C, but it also has a Python API which uses Python extension modules written in C.
What is the best way to write installation/deployment scripts for a Linux/UNIX environment? Usually, I use the make utility to compile and install projects written in C. Most of the time, I just have the make utility compile all the source code into executables, and then copy the executables to /usr/local/bin.
However, my Python API requires the compilation/installation of shared library (.so) files for use with Python. This basically involves compiling the necessary C files, and then copying the shared libraries to some directory that is part of the Python sys.path, such as /usr/local/lib/pythonX.X/dist-packages/.
But how can the appropriate directory for Python extension modules be detected by the Make utility? Is there an environment variable or something that lists the directories in Python's sys.path?