Pete Shinners wrote:
We actually just ran into the same question. So I'd like to hear anyones answer as well. For now what we did is before the call to setup() we modify our list of Extensions. If we are on linux we do it one way, on windows another. Not pretty but it works. We have a little easier situation then you though because our "other library" is a python .so so we just import it to find the path....
i've got a python extension that is simply a wrapping around another C library. (not an uncommon case :])
i cannot figure out the 'right' way to check for and link/include this dependency into my distutils setup.py script.
under linux, it's pretty easy to assume the correct header and shared library will be somewhere in the standard include and library directories /usr/local/include, /usr/local/lib, etc
my main concern is getting it working with windows (and keeping it crossplatform happy for linux). my best bet in windows seems to be walk around the parent directory tree trying to find directories for the dependency?? if that is the best way, it would probably be nice for the linux version to use this method or look in the standard compiler directories ???????
i'm hoping someone out there has an example doing just this sort of stuff i could look at. the documentation doesn't mention anything about this sort of stuff. (except for adding library and include info to the Extensions() call
thanks for any help and/or guidance. the distutils have just amazed me.
(please help, i couldn't get any responses on c.l.python)
Distutils-SIG maillist - Distutils-SIG@python.org http://www.python.org/mailman/listinfo/distutils-sig