|
From: Fernando P. <Fer...@co...> - 2004-04-22 15:57:52
|
Hi Andre,
Andre Wobst wrote:
> Hi Fernando,
>
> On 20.04.04, Fernando Perez wrote:
>
>>Thanks for addressing this. I noticed you are discussing the finer points
>>of the solution, and running into the usual (and incredibly annoying)
>>limitations of distutils.
>
>
> I've seen you joining those discussions in the c.l.p and we had this
> issue together before as well (I think it was on this list). So let me
> briefly tell you, what solution I came up yesterday. Its not at all
> perfect, but I think it points into the correct direction to go.
[snip]
> Another thing would be to discuss this issue and the PyX solution we
> have now on sig-distutils or the like. Its obviously a general problem
> within distutils and its missing a standard solution. We might
> postpone that until we have some feedback from our new solution ...
While I see nothing in principle wrong with your solution, and I think it's a
very reasonable approach for existing (up to python 2.3) installations, I
would REALLY like to see the distutils developers make something like this
much easier. The problem you are facing is a fairly standard one, and there's
no reason why something like this should require such convoluted solutions.
The distutils setup() function should simply have a standard way of leaving
this information in the package installation directory. IMHO, setup() should
always create a __setup__.py file in the package's top directory, containing a
dictionary with all the values for the various paths which were _actually_
created, depending on what the user put in. This file should also have the
possibility of being used by an automatic uninstall routine, by being a proper
python script itself:
#### hypothetical __setup__.py (not indented, typed in my mail client):
setup_data = {'data_dir':'/home/foo/local/share',
'package_dir':'home/foo/local'}
if __name__ == '__main__':
import distutils
import sys
if sys.argv[1] == 'uninstall':
distutils.uninstall(setup_data)
#######################################################
If something as simple as this were done by distutils, we'd have:
1. A trivial way for any package to know where all of its stuff ended up
splattered on the filesystem, so it can go later and find any of its own files.
2. An automatic, platform independent way to do uninstalls:
$ python __setup__.py uninstall
Any thoughts? Feel free to pass this message on to c.l.p or the distutils
folks, if you like the idea. I'll have very limited computer access for a
week or two starting tomorrow, so I won't be able to follow this further.
However, I would very much like to see improvements on this fronts, distutils
is IMHO one of python's few outright disastrous areas.
Cheers,
f
|