[Distutils] deprecating pip install --target
p.f.moore at gmail.com
Thu Feb 11 14:43:05 EST 2016
On 11 February 2016 at 19:07, Robert Collins <robertc at robertcollins.net> wrote:
> But, I think it would be better to deprecate it and remove it... so
> I'm pinging here to see if anyone can explain a sensible use case for
> it in the context of pip :)
I have used it in the past to bundle libraries in an application I'm
building using zipapp. So I'd write my __main__.py, create a "libs"
subdirectory, and "pip install --target libs" any dependencies I have.
Because it's a zipped application, I'm only including pure-Python
libraries so as long as they don't have data files they are fine.
That's basically the same use case as vendoring.
It's not something I do a lot, but I'd like there to be at a minimum,
a documented replacement approach (that's roughly as convenient -
"install your dependencies somewhere and copy them" or "download a
wheel and unzip it manually" aren't really what I have in mind). I do
think that creating zipped applications *should* be a reasonable use
case - I think it's a woefully under-used deployment option, and I'd
hate to see more obstacles put in the way of people using it.
Alternatively, it should be possible to *detect* the problem cases, so
why not do that, and reject them? Effectively, reduce the scope of
--target to pure-python wheels only.
More information about the Distutils-SIG