Question on using distutils.core.run_setup

T

Terry Jones

I'm trying to programmatically install something built using distutils. I
found distutils.core.run_setup and can use it via
>>> dist = run_setup('setup.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 programmatically? I don't see anything useful on
the distutils.dist.Distribution instance I'm getting back from run_setup.

Thanks!

Terry
 

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
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top