rpath alike feature for python scripts

dieter dieter at handshake.de
Sat Jul 26 07:48:59 CEST 2014

Olaf Hering <olaf at aepfle.de> writes:

> ELF binaries have a concept of RPATH, that means the interpreter looks
> for libraries first in a list of directories provided by the binary
> before falling back to default system directories.
> Since python scripts also do some sort of library loading, but lack an
> RPATH like feature, I'm asking here how to simulate it.

The "binary" corresponds to a script. The script could have
a function "setup_path" which enhances "sys.path" as appropriate
and ensure that this function is called near its beginning.

More information about the Python-list mailing list