Relocatable python install

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Apr 14 18:01:00 EDT 2010


En Wed, 14 Apr 2010 18:00:24 -0300, Mike Kent <mrmakent at cox.net> escribió:
> 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?
>
> 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.

-- 
Gabriel Genellina




More information about the Python-list mailing list