|
From: <kon...@la...> - 2006-01-23 18:39:27
|
On Jan 23, 2006, at 19:03, Andrew Straw wrote: > The problem is backwards compatibility. Nothing like this is =20 > implemented > in plain distutils, which is why the packages will have to support it > themselves. This way they can keep working in both old distutils-based > environments and new ones, including with setuptools. The current > solution _works_ on yesteryear's Python 2.3. In my opinion, relying on Well, I'd argue it doesn't work at all, because it doesn't scale to =20 complex dependency trees. > Distutils never handled the case when, for example you installed =20 > Numeric > with '/usr/local/bin/python2.3 setup.py install > --prefix=3D/home/astraw/py23'. In this case, sure, the package got > installed where I wanted (in my $PYTHONPATH) in > /home/astraw/py23/lib/python2.3/site-packages/Numeric, but the headers > were in /home/astraw/py23/include/python2.3/Numeric. Distutils would True. It was always true that if you install anywhere but in the =20 default location, you are on your own. But if you do keep the default =20= location (as most users do), everything works fine. > never find those headers again. This is exactly the same problem, and > it's one that distutils never solved, and I don't think we should hold > our breath waiting for Python 2.5's distutils to solve it. For one Why not contribute to solving it? > thing, it's already solved at the package level a la numpy. For =20 > another, > given that it's already solved, who's going to bother attempting to =20= > make I don't think it is solved at all. > Why is "import numpy; include_dirs=3Dnumpy.get_numpy_include()" in > setup.py unpalatable for you? That's all that is required in setup.py. Let's go back to my initial scenario, and let's even forget about =20 multiple versions. I have ScientificPython, which can be compiled for =20= use with either Numeric or numarray, and some day NumPy will be a =20 third choice. Then I install MMTK, which depends on ScientificPython. =20= How is the MMTK installation script supposed to figure out if =20 ScientificPython was compiled with Numeric, numarray, or NumPy? And =20 how is it supposed to know where each of these packages stores its =20 header files? I don't mind adding some lines to setup.py for each package, that's a =20= small price to pay. But I do mind having to worry about indirect =20 dependencies. > to argue this is more pain than you're willing to deal with, I think > that, to be fair, you need to give a counter-example whereby you =20 > explain > how you handle all those versions of Numeric and Scientific installed > simultaneously and how you select among them. I'll admit that in the I don't, except on my development machine, where I used symbolic =20 links that are changed using scripts. That's a bit of work to set up, =20= but I have only two packages of which I use multiple versions, so =20 doing it once is acceptable for me. In fact, my main worry is not my own machine, nor the machine of any =20 competent Python programmer. My worry is the less competent user who =20 can't get installation of my packages to work and turns to me for =20 help. Tech support takes more of my time than development these days. =20= A fragile dependency system such as the one you propose will only =20 create more support questions on my side - so don't expect me to =20 support it. > Like I said above, distutils has no such equivalent mechanism, and =20 > this > _allows_ something that simply wasn't possible before and is arguably > broken in distutils. I am all for fixing distutils. Konrad. -- --------------------------------------------------------------------- Konrad Hinsen Laboratoire L=E9on Brillouin, CEA Saclay, 91191 Gif-sur-Yvette Cedex, France Tel.: +33-1 69 08 79 25 Fax: +33-1 69 08 82 61 E-Mail: kh...@ce... --------------------------------------------------------------------- |