Relocatable python install

M

Michel

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.
 
M

Mike Kent

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.
 
G

Gabriel Genellina

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.

Note that scripts installed using distutils.core.setup(scripts=[...], ...)
get the fix automatically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top