python setuptools/distribute in macports
ryandesign at macports.org
Mon Mar 29 13:14:59 PDT 2010
On Mar 29, 2010, at 15:07, Alan Franzoni wrote:
> I'm quite a recent Mac and macports a user, on the contrary I'm a Python
> developer since quite a lot of years.
> There's something "strange" in macports about python: setuptools and
> distribute are considered conflicting ports, while they're effectively
> two different "implementations" for the very same module, distribute
> being a drop-in replacement for the older and less maintained setuptools.
The one necessitates the other: Whenever you have two ports which are direct replacements for one another, they must logically install the same files in the same places, and should therefore be marked as conflicting with one another.
> I've seen this discussion about the topic:
> My question is: why taking the conflicting port path? I seem to
> understand that the port system has no "provides" tag like rpm/dpkg
> based packaging systems,
> it's got a "variants" concept
> and it makes differences between an "installed" and an "active" port.
> Why can't just setuptools and distribute be two variants for a port?
It's not appropriate for a variant to change a port's name and version, which is what such a hypothetical variant would have to do, along with changing the distfile and checksums. This is simply not what variants are for in MacPorts. They're for adding optional features to ports.
> Or why can't them
> be installed at the same time, but could then be just activated when
> needed (just guessing on the technical possibility of doing this last
They can. That's what "conflicts" means. Ports that conflict with one another cannot be active at the same time, but can be installed at the same time, and you can deactivate one and then activate the other.
> Otherwise, I think that macports should pick either and forbid the
> other; otherwise strange behaviours may occur (e.g. I can't install two
> python ports at the same time because one needs setuptools and the other
> needs distribute).
I agree we should pick one or the other.
> Have you thought anything about just keeping setuptools for 2.6 and
> forcing a switch to distribute with python 2.7 / 3.x?
I seem to recall that was proposed as well. I don't know the python ports so I'll defer to someone who does.
I did notice one py26 port I used yesterday which seemed to specifically want distribute and not setuptools; I have setuptools installed, and this port downloaded distribute of its own accord. So perhaps we should switch to distribute for py26 already. The question is whether there is any port that requires setuptools and cannot use distribute.
More information about the macports-users