On Fri, Jun 16, 2017 at 2:08 AM, Thomas Kluyver <tho...@kluyver.me.uk> wrote: > > On Fri, Jun 16, 2017, at 08:41 AM, Nick Coghlan wrote: > > > I think we should rename get_build_requires to > > > get_build_wheel_requires, and add a get_build_sdist_requires. And the > > > rule would be: > > > > > > get_build_sdist_requires: can assume build-system.requires are available > > > get_build_wheel_requires: can assume build-system.requires are available > > > > > > build_sdist: can assume build-system.requires and > > > get_build_sdist_requires are available > > > prepare_wheel_metadata, build_wheel: can assume build-system.requires > > > and get_build_wheel_requires are available > > > > +1 from me > > *Sigh*, another hook. It makes sense in context, but I can't shake the > feeling that what was a relatively simple spec is steadily turning into > a complex monster. I still resent that we're trying to standardise an > interface to build sdists at the same time as one to build wheels.
Yeah. Well, except I'm not *too* bothered by the sdist part in particular, since the spec already had to define what an sdist was. And if you zoom out then we have get_build_{wheel,sdist}_requires which have identical interfaces, and build_{wheel,sdist} which also have identical interfaces, so the total complexity for this part isn't too high at all. The messy complications come from prepare_wheel_metadata and get_prepare_wheel_input_files, which isn't surprising, since those are the two hooks where we're squinting into our crystal ball to try and guess what will be useful for software that doesn't exist yet, but will later, maybe, we hope. Hmm, here's another plea for simplicity, but from a slightly different direction that I just thought of: what if we said that any hooks starting with "ext_pip_..." are reserved for pip's use, and pip can make up whatever semantics it likes for them. And then as the parts of pip that actually want to use prepare_wheel_metadata and/or get_prepared_wheel_input_files come online, we use the ext_pip_* versions of those hooks to prototype them and work out any issues. And then once there's an actual implementation and proven value, we write a new PEP to drop the ext_pip_ prefix and make them standard. What do you think? -n -- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig