[Distutils] Proper handling of PEP420 namespace packages with setuptools and pip

Robert Collins robertc at robertcollins.net
Wed Apr 22 23:20:00 CEST 2015

On 23 April 2015 at 07:25, M.-A. Lemburg <mal at egenix.com> wrote:
> On 22.04.2015 21:08, Robert Collins wrote:

> I don't think support mixed setups is really a practical option.
> Either the namespace package is legacy all the way, or it
> isn't and uses PEP 420.
> Wouldn't it be possible for setuptools or pip to work this out
> depending on the Python version ?

Ah, ok so I think this is the crux - I'm arguing that Python version
isn't a big enough check. Because anything installed with a current
version of setuptools, or any wheel built likewise, is going to not
have that per-Python-version check.

And it seems to me that that implies that bringing in a
per-Python-version check in a new release of setuptools or pip is
going to result in mixed mode installs:

install name.A with setuptools-X [legacy]
upgrade setuptools
install name.B with setuptools-Y [does a Python version check]
-> boom

But perhaps sufficient glue can be written to make it all work.

My personal preferred migration strategy is:
 - have a flag day amongst the cooperating packages that make up the namespace
 - release versions that are all in the new layout in a batch to PyPI.

It would be nice if PEP-426 had a conflicts stanza, so you could say
conflicts: [name.A < version_with_new_X] without that implying that
name.A *should* be installed.


Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Converged Cloud

More information about the Distutils-SIG mailing list