[Distutils] [Numpy-discussion] Proposal: stop supporting 'setup.py install'; start requiring 'pip install .' instead
Donald Stufft
donald at stufft.io
Sat Nov 7 18:16:34 EST 2015
On November 7, 2015 at 6:07:47 PM, Paul Moore (p.f.moore at gmail.com) wrote:
> On 7 November 2015 at 22:47, Donald Stufft wrote:
> > Only if we think we can trust the version numbers to be unique from random paths on the
> file system.
>
> Precisely. And that's the sort of trade-off that Ralf was asking to be
> clarified. Here, the trade off is that if we *are* allowed to rely on
> the fact that name/version uniquely identifies the build, then we can
> optimise build times via wheel cacheing. If we can't make that
> assumption, we can't do the optimisation.
>
> The request here seems to be that we provide the best of both worlds -
> provide optimal builds *without* making the assumptions we use for the
> "install a released version" case.
> Paul
>
Well, you can get the optimized builds by not copying the path into a temporary location when you do ``pip install .`` and just letting the build system handle whether or not it caches the build output between multiple runs.
I don’t want to start doing this, because I want to make a different change that will make it harder (impossible?) to do that. I want to reduce the “paths” that an installation can go down. Right now we have:
1. I have a wheel and pip installs it.
2. I have an sdist and pip turns it into a wheel and then pip installs it.
3. I have an sdist and pip installs it.
4. I have a directory and pip installs it.
5. I have a directory and pip installs it in editable mode.
The outcome of all of these types of installs are subtly different and we’ve had a number of users regularly get confused when they act differently over the years. I do not think it’s possible to make (5) act like anything else because it is inherently different, however I think we can get to the point that 1-4 all act the exact same way. and I think the way to do it is to change these so instead it is like:
1. I have a wheel and pip installs it.
2. I have an sdist and pip turns it into a wheel and then pip installs it.
3. I have a directory and pip turns it into a sdist and then pip turns that sdist into a wheel and then pip installs it.
4. I have a directory and pip installs it in editable mode.
Essentially, this is removing two “different” types of installations, one where we install directly from a sdist (without ever going through a wheel) and one where we install directly from a path (without ever going through a sdist or a wheel). Omitting the whole editable mode from the consideration, we get to a point where installs ONLY ever happen to go from a “Arbitrary Directory” to an Sdist to a Wheel to installation and the only real differences are at what point in that process the item we’re trying to install is already at.
Of course development/editable installs are always going to be weird because they are in-place.
-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
More information about the Distutils-SIG
mailing list