[Distutils] pip/easy_install mercurial in virtualenv on Python 3.3
Carl Meyer
carl at oddbird.net
Mon Feb 25 18:38:37 CET 2013
On 02/25/2013 10:31 AM, Christian Tismer wrote:
> Actually, I would love to have both python2 and python3 in the same
> virtualenv, for testing purposes, distinguishing the versions by using
> the different interpreter, only.
> But installing both versions after another messes things up very much
> and led to the effect that I always got python3, even if I explicitly ran
>
> (virtenv) $ python2
>
> Python 3.3.0 (default, Dec 29 2012, 18:23:00)
> ...
That's interesting. I'd expect that if you first created a venv using
Python 3, then removed the "python" symlink leaving only "python3", then
installed a Python 2 virtualenv in the same location, things would work
as you wish them to (at least on Linux/OSX; superimposed venvs don't
work at all on Windows AFAIK because the Lib directories aren't versioned).
>>> And who is responsible to make things "right":
>>> Should virtualenv avoid this naming problem,
>>> or should the mercurial installer become more carefully specify its
>>> interpreter?
>> In general, I think that it is wrong for system-installed scripts to
>> ever use "/usr/bin/env python" in the shebang line, as that makes it too
>> easy for them to be run with the wrong Python. I know that, for
>> instance, it is the policy of Debian/Ubuntu to not use "#!/usr/bin/env
>> python". I don't know what homebrew's policy is, but I'd suggest raising
>> this as a bug in the Homebrew Mercurial package.
>>
> Thank you. Yes I feared that I would have to prove it to be a hg bug
> (again), not always the nicest experience ;-)
Well, let's distinguish between "Mercurial bug" and "bug in Homebrew
recipe for Mercurial" - usually the latter is the responsibility of
Homebrew, not Mercurial. I don't know what the Homebrew people will say,
but my guess is you are more likely to see this fixed at the Homebrew
level than in Mercurial itself.
Carl
More information about the Distutils-SIG
mailing list