[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python 3.4 and ensurepip (rehashed, long)



[Robert Collins, 2014-03-26]
> On 26 March 2014 17:15, Scott Kitterman <debian@kitterman.com> wrote:
> > On Tuesday, March 25, 2014 15:29:06 Barry Warsaw wrote:
> >> On Mar 25, 2014, at 03:19 PM, Donald Stufft wrote:
> >> >I assume once someone has installed pip with apt-get they'd still be able
> >> >to run pip install --upgrade pip if they wanted too?
> >>
> >> I would think they should be able to do that.
> >
> > If I've install a package and it's upgraded (this is for the system, not for
> > any kind of virtualized/isolated environment), I would find it quite surprising
> > and unfortunate that it upgraded itself from an external source.
> 
> I'd be very surprised if a package manager told to upgrade itself used
> a different source for its own code vs things it manages.
> 
> Yes, people that use pip to install things globally deserve to keep
> both pieces, but either prohibit it entirely, or have it work as
> advertised, not some frankenstein.

let¹ `sudo pip install ...` (or `python3.X -m ensurepip ...` ) install
eggs/whls into /usr/local/pythonX.Y/dist-packages and `sudo pip upgrade`
(or `python3.Y -m ensurepip --upgrade`) upgrade *only* eggs/whls from this
directory.

This way system packages are not touched and it's easy to
clean after pip (`find /usr/local/pythonX.Y/dist-packages/ -name '*.(egg|whl) -delete')
or copy eggs/whls to virtualenv.

[¹] if used with --i-will-not-blame-debian or i-will-not-blame-debian=true in
    ~/.pydistutils.cfg
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


Reply to: