Distutils question

Fernando Pérez fperez528 at yahoo.com
Thu Dec 20 07:24:05 EST 2001


Michael Hudson wrote:

> Well, one option would be to *in your script* ask distutils where they
> will have gone:
> 
>>>> from distutils.core import Distribution
>>>> from distutils.command import install
>>>> i = install.install(Distribution())
>>>> i.finalize_options()
>>>> i.install_data
> '/home/crew/mwh'
> 

Thanks a lot for this tip. distutils is nice, but I'd have to say it needs 
some work in the documentation dept. Most of the functions don't even have 
docstrings, and the problem is that setup() is very much a one-way black box. 
It takes a few options but there's no (documented) way of knowing what it 
did, where it put things.

> But that's risky; it can be affected by the user options to setup.py.

That's what I'm afraid of. If the user gives a --home=~/local for example, is 
there any way to know about that?

> 
> I'd hope it would be possible to get distutils to install a file in
> your package saying where things ended up, but I have no idea if/how
> this is possible.
> 
>> I'm sure that people who have used distutils for big projects have
>> run into this,
> 
> And they probably hang out on the distutils-sig; I suggest asking
> there might have better luck.

mmmh. Didn't know about such a thing. Thanks, google did its usual good deed, 
I'll try to bugger those folks a bit.

Again, thanks for your help,

Fernando



More information about the Python-list mailing list