On Sat, Jun 24, 2017 at 7:57 AM, Thomas Kluyver <tho...@kluyver.me.uk> wrote:
> Nick has merged that PR, and the updated PEP is visible here:
>
> https://www.python.org/dev/peps/pep-0517/
>
> Hopefully we're nearing a consensus on this now. If you're interested,
> please do have a read through the latest version.
>

Reading through it just now, there were some bits that gave me the
impression that prepare_build_wheel_files must *always* be called
before calling build_wheel (e.g. "Because the wheel will be built from
a temporary build directory, build_wheel may create intermediate files
in the working  directory, and does not need to take care to clean
them up."). If we end up keeping prepare_build_wheel_files, then I
think we should add some text making clear exactly which paths are
legal.

...and in the current spec this is complex enough that something like
a state machine might be the clearest way? Here's an attempt at an NFA
representation.

Notation: [foo] is a state, --bar--> is a labeled transition.

Required transitions:

[VCS checkout] --build_wheel--> [wheel]

Required transitions if you want to have a useful sdist at all:

[VCS checkout] --build_sdist+unpack--> [non-VCS tree]
[non-VCS tree] --build_wheel--> [wheel]

Required if you have a prepare_wheel_metadata hook:

[VCS checkout] --prepare_wheel_metadata--> [checkout+metadata]
[checkout+metadata] --build_wheel(..., metadata_directory=...)--> [wheel]
[non-VCS tree] --prepare_wheel_metadata--> [non-VCS tree+metadata]
[non-VCS tree+metadata] --build_wheel(..., metadata_directory=...)--> [wheel]

Plus you should support EITHER:

[non-VCS tree] --build_sdist+unpack--> [non-VCS tree]

OR:

[VCS checkout] --prepare_wheel_build_files--> [non-VCS tree]
[non-VCS tree] --prepare_wheel_build_files--> [non-VCS tree]

...I'm not sure this is really making things clearer. (Though a
graphviz version would be less terrible than the text version, maybe?)

-n

-- 
Nathaniel J. Smith -- https://vorpus.org
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to