Question on using distutils.core.run_setup

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Terry Jones

    #1

    Question on using distutils.core.run_setup

    I'm trying to programmaticall y install something built using distutils. I
    found distutils.core. run_setup and can use it via
    >>dist = run_setup('setu p.py', ['-q', 'install'])
    Is that the recommended way to do an install from inside Python (as opposed
    to doing it on the command line)?

    If so, how can I find where the thing(s) I installed now resides? I saw
    dist.packages but that just has top-level package names. I could __import__
    these (and then use module.__file__ ), but that's not a good solution as it
    may run code I don't want run. On my machine, I can see the packages have
    been installed under the system's python2.5/site-packages directory. But
    how can I determine that programmaticall y? I don't see anything useful on
    the distutils.dist. Distribution instance I'm getting back from run_setup.

    Thanks!

    Terry
Working...