Distutils postinstall script: useless?

M

Mardy

Hi,
the bdist_wininst command of distutils allows me to specify a script to
be executed at the end of the installation. That's great, but how can I
know the installation path from inside the script?

I've already tried os.getcwd(), but it just return the directory where the
setup was started.
 
M

Mardy

Le die Wed, 30 Nov 2005 15:46:43 +0000, Mardy ha scribite:
the bdist_wininst command of distutils allows me to specify a script to
be executed at the end of the installation. That's great, but how can I
know the installation path from inside the script?

Answering to myself, sys.prefix combined with the dictionary
INSTALL_SCHEMES from distutils.commands.install might do the work.
 
T

Thomas Heller

Mardy said:
Le die Wed, 30 Nov 2005 15:46:43 +0000, Mardy ha scribite:

Answering to myself, sys.prefix combined with the dictionary
INSTALL_SCHEMES from distutils.commands.install might do the work.

See also the functions in distutils.sysconfig.

Thomas
 

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

Forum statistics

Threads
474,273
Messages
2,571,363
Members
48,047
Latest member
prince15

Latest Threads

Top