[Distutils] One Package Per Project

Brandon Craig Rhodes brandon at rhodesmill.org
Fri May 1 16:20:07 CEST 2009


I think that, going forward, Python packaging tools (not installation
tools; they should remain as they are, for backwards compatibility)
should move to supporting only One Package Per Project.  And, each
project should have the same name as the package inside.  In the future,
people should have to download an old copy of distutils deliberately if
they want to build projects with several packages inside; we should stop
releasing tools that support or encourage it.

 1. It is easier on developers who want to "import escher" to know that
    they can simply list "escher" as a dependency instead of having to
    guess whether it's "Escher" or "EscherProject" or whether it's part
    of a larger "lithographers" project or whether, heaven forbid, the
    author decided to redundantly call the project "pyescher".

 2. This practice would make PyPI's name make actual sense.  It actually
    claims to be (you can check the site!) the "Python *Package* Index"
    whereas in fact it's currently nothing of the sort!  It's really an
    index of "projects" that might have zero, one, or several packages
    inside of them.  We should move all projects towards the good
    behavior of the ones that already name themselves after the single
    package that they contain.

 3. I think the whole idea of putting several packages in a project was
    useful back when dependencies didn't exist.  It made sense, in
    ancient days, for "ZODB" to include "transaction" because there was
    no other way to make sure they got installed together.  But now that
    dependencies are possible, there is no longer a need for multiple-
    package project that outweights the costs involved.

 4. The current scheme makes it impossible to choose a "safe" package
    name when creating and registering a new package.  Just because
    there's no "escher" *project* when you look at PyPI doesn't mean
    that some project doesn't have an "escher" package hidden inside.
    You could choose a package name, distribute your product, and only
    find out later that your users cannot install both your product and
    another product simultaneously because the other product was, in
    fact, already using that package name but without your knowing it.

-- 
Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon


More information about the Distutils-SIG mailing list