[Distutils] Python people want CPAN and how the latter came about
David Cournapeau
cournape at gmail.com
Mon Dec 21 23:48:55 CET 2009
On Mon, Dec 21, 2009 at 7:13 PM, Lennart Regebro <regebro at gmail.com> wrote:
> What nobody still fails to explain in this discussion is what CPAN
> "is" and Why Python doesn't already have it.
That's not the right question to ask. The problem is not much a
feature problem as much as a fundamental implementation and "state of
mind". Reliable packaging requires explicit handling, where the whole
python stack for packaging relies a lot on implicit behavior. I don't
know much about CPAN, but both CRAN ("CPAN for R") and hackage ("CPAN
for haskell") work reliably where Pypi often fails, and the reasons
are easy to see:
- distutils (and most tools on top) throw away metadata, and then
other tools try to guess them back. That alone is source of numerous
errors, weird hacks, and unexplainable issues. Generally, when there
is a design error at some level, instead of fixing it at this level,
tools try to add another level of complexity to circumvent it. The
fact that python has something like 5 or 6 tools to deploy things
where most other languages have only one or two is quite striking.
- Linked to the above, metadata are not enforced in pypi. This just
cannot work. Most other systems in existence enforce strict rules.
- Most crucial stages (install by distutils/setuptools, retrieving
metadata, file formats like eggs) are not specified, and
implemented/executed in an ad-hoc fashion. As a result, easy_install
often fails to install things correctly, and the errors are hard to
recover for people not familiar with python. For example, when you
install a package, the previous installation is not removed. Worse,
there is no way to correctly uninstall things, because the way
distutils install things is dumb (dumping whatever is in the build
directories instead of building a precise list of what is to be
installed). This alone is a constant source of issues for us with
numpy and scipy.
- etc...
David
More information about the Distutils-SIG
mailing list