On 4 July 2017 at 17:22, Thomas Kluyver <tho...@kluyver.me.uk> wrote:
> On Tue, Jul 4, 2017, at 01:06 AM, Donald Stufft wrote:
>
> 2) We have a VCS directory or “original development source” or whatever you
> want to call the thing you have before a sdist that typically gets into a
> sdist.
>     - Works on both proposals for setuptools and flit (since both can go
> from a VCS to a sdist).
>     - Thomas might have said he’d be unhappy if this case goes through a
> real sdist… I forget the specifics of that discussion now.
>
>
> Practical objection: besides it being a VCS checkout, you need the VCS tools
> available (e.g. git on $PATH). It's not hard to imagine cases where this
> doesn't hold, e.g. installing from a directory bind-mounted into a docker
> container. Between this and your case 3 (local directory not a VCS
> checkout), failures - while not common - won't be particularly rare.

*sigh* I knew there was a reason I didn't want to rerun this
particular argument :)

> So can we please leave the hook in place?

+1, but we should explicitly note in the rationale section of the PEP
that it's to cover both of the following cases:

* build from an already unpacked and potentially edited sdist"
* cleanly support explicitly out-of-tree builds even when the
dependencies for working with the VCS aren't available

Both Donald & I managed to forget that rationale between the first
round of the argument and this reiteration of it, so I assume it isn't
a particularly obvious point in general.

Including the hook then leaves it up to frontends to decide whether
they want to always use an out-of-tree build strategy or not.

If pip makes that choice (as we expect it to), and some folks don't
want that behaviour, we'll strongly encourage them to define a new
local development focused frontend that uses an incremental build
strategy by default, rather than subverting the build preparation
hook.

(Alternatively: pip has added an "--upgrade-strategy" hook to choose
between eager and only-if-needed upgrades, and is likely to add a
"--scheme" option to explicitly choose between working with the
global, user, and venv installation sets, so it may be possible to
make the case for adding a "--build-strategy" option that defaulted to
the current "out-of-tree" model, but also allowed people to explicitly
opt in to an "incremental" variant that executed an in-place build in
the current venv)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to