I have a project that is mostly written in C, but it also has a Python API that uses Python extension modules written in C.
What is the best way to write installation / deployment scripts for a Linux / UNIX environment? I usually use the make utility to compile and install projects written in C. In most cases, I have a make utility that compiles all the source code into executable files and then copies the executable files to /usr/local/bin .
However, my Python API requires compiling / installing shared library ( .so ) files for use with Python. This is mainly related to compiling the necessary C files, and then copying the shared libraries to some directory that is part of Python sys.path , for example /usr/local/lib/pythonX.X/dist-packages/ .
But how can you determine the appropriate directory for Python extension modules using the Make utility? Is there an environment variable or something that lists directories in Python sys.path ?
source share