Relocatable python install

Mike Kent mrmakent at cox.net
Wed Apr 14 17:00:24 EDT 2010


On Apr 14, 4:50 pm, Michel <michel.metz... at gmail.com> wrote:
> Hi,
>
> I would like to create a binary package of python that we will ship
> with our product. I need to be able to install the package anywhere in
> the file system.
>
> The interpreter seems to be ok with that, but a few other tools that
> are installed in the PREFIX/bin directory (pydoc, py2to3, python-
> config,...) contain hardcoded path to the interpreter.
>
> Is there a way around that? Or an configure option to prevent these
> files to be installed?
>
> Regards,
>
> Michel.

The standard way to handle this seems to be to write a post-install
script that edits the interpreter path in those scripts to point it to
the actual install path.  I had to handle the same thing, and others
have done it as well.



More information about the Python-list mailing list