rpath alike feature for python scripts

dieter dieter at handshake.de
Tue Jul 29 07:38:06 CEST 2014


Olaf Hering <olaf at aepfle.de> writes:

> On Sat, Jul 26, dieter wrote:
>
>> 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.
>
> Yes, but how does it obtain the required values? In other words, at
> buildtime /some/where is known because its the --prefix= value.
> How does it know the remainder?

You must tell it -- as you do for POSIX binaries.

For POSIX binaries, you specify the values as parameters for the
linker. Which Python scripts, you do not have a linker but you
can put the necessary values in the script itself - e.g. in the form
of an "RPATH = [...]" definition.




More information about the Python-list mailing list