I am working on a project written in C using autotools, which creates a static library. I also provide a Python interface for the C API in the context of the same project. Until recently, I did not have permission to introduce libtool into the project in order to be able to provide both static and dynamic libraries in a portable way. So far, I have created a general Python module using distutils, and linked the python module to the static library of the C project. Again, this is because I was not allowed to inject libtool / shared libraries into ecuation. Now, when I want to enable libtool, I came across the following two problematic scenarios:
If I continue to create a general Python module using distutils, since distutils and autotools do not talk to each other, I need to tell distutils which C library to connect to. So far, I can’t think of any way to do this, but I was able to parse the .la file to get the name and path of the libtool library. Does libtool provide any information as to which library it could create on the system?
If I translate the production of the Python module for automation, that's fine until I get to the installation process. I do not know how to say libtool. I want my Python module to be somewhere else than the lib folder, that is, "lib / python2.5 / site-packages / myproject". I tried just copying the library into the Makefile, but this did not work properly, as the library had the wrong rpath (not assembly, not installation). Why do I want him there? Because there are also .py wrappers there. So, is there a way to tell libtool to install my module somewhere else and install rpath correctly?
I assume that I'm just looking for an elegant solution, or maybe there is a solution, and it's simple, but I do not see it, because I am not experienced enough. Any help?
P.S. 2, , distutils.