Re: [Distutils] Finishing up PEP 517

2017-06-29 Thread Daniel Holth
Sounds good, I'll bring it up there. On Thu, Jun 29, 2017, 17:54 Bill Deegan wrote: > Daniel, > > Perhaps the better way to go about it than to call scons N times is to > have N variant dirs? where there's a variant dir for each build type you > want, and then youd

Re: [Distutils] Finishing up PEP 517

2017-06-29 Thread Bill Deegan
Daniel, Perhaps the better way to go about it than to call scons N times is to have N variant dirs? where there's a variant dir for each build type you want, and then youd call scons build_wheel which is aliased Alias('build_wheel','variant_dir for building wheel path') Maybe bring this up on

Re: [Distutils] Finishing up PEP 517

2017-06-28 Thread Daniel Holth
The other thing I noticed is that build-system requires has no hyphen but build-backend does. On Wed, Jun 28, 2017, 22:28 Daniel Holth wrote: > That would fit with setup.py, which also likes to sys.exit() after one > command. > > On Wed, Jun 28, 2017, 22:25 Nick Coghlan

Re: [Distutils] Finishing up PEP 517

2017-06-28 Thread Daniel Holth
That would fit with setup.py, which also likes to sys.exit() after one command. On Wed, Jun 28, 2017, 22:25 Nick Coghlan wrote: > On 29 June 2017 at 11:42, Daniel Holth wrote: > > I was able to implement PEP 517 build_wheel and build_sdist for enscons >

Re: [Distutils] Finishing up PEP 517

2017-06-28 Thread Nick Coghlan
On 29 June 2017 at 11:42, Daniel Holth wrote: > I was able to implement PEP 517 build_wheel and build_sdist for enscons (on > bitbucket), and a click cli calling any backend mentioned in pyproject.toml. > Pretty simple. Not sure what to do with the config dictionary. That's

Re: [Distutils] Finishing up PEP 517

2017-06-28 Thread Daniel Holth
I was able to implement PEP 517 build_wheel and build_sdist for enscons (on bitbucket), and a click cli calling any backend mentioned in pyproject.toml. Pretty simple. Not sure what to do with the config dictionary. SCons is not designed to be called twice in the same process with different

Re: [Distutils] Finishing up PEP 517

2017-06-28 Thread Thomas Kluyver
On Wed, Jun 28, 2017, at 06:07 PM, Daniel Holth wrote: > Is there a prototype implementation of pep 517 yet? - Flit has a PR with a prototype backend implementation, though it's not up to date with all the changes the PEP has undergone. I'll update it when we've agreed on a spec - it's

Re: [Distutils] Finishing up PEP 517

2017-06-28 Thread Nathaniel Smith
I don't think anyone has proposed anything involving magic strings? On Jun 28, 2017 3:58 AM, "Robert Collins" wrote: > > > Re: returning magic strings to indicate exceptions. Please no. Just no. > Have any pep build host add a small library to Python path with any

Re: [Distutils] Finishing up PEP 517

2017-06-28 Thread Daniel Holth
Is there a prototype implementation of pep 517 yet? On Wed, Jun 28, 2017, 06:58 Robert Collins wrote: > > > Re: returning magic strings to indicate exceptions. Please no. Just no. > Have any pep build host add a small library to Python path with any symbols > we want

Re: [Distutils] Finishing up PEP 517

2017-06-28 Thread Robert Collins
Re: returning magic strings to indicate exceptions. Please no. Just no. Have any pep build host add a small library to Python path with any symbols we want to define. Hardly an implementation hurdle. Rob ___ Distutils-SIG maillist -

Re: [Distutils] Finishing up PEP 517

2017-06-28 Thread Paul Moore
On 28 June 2017 at 05:29, Nick Coghlan wrote: > On 28 June 2017 at 13:43, Nathaniel Smith wrote: >> I would say that there's only one required path, which is in-place. >> (But the tree that they do the in-place build in might have a more or >> less complicated

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nick Coghlan
On 28 June 2017 at 14:36, Nathaniel Smith wrote: > I think that in these two cases, all the hooks used in the > wheel-building phase should be run in exactly the same way, i.e., > inside the unpacked sdist, with no reference to the original working > tree that that sdist was

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nick Coghlan
On 28 June 2017 at 14:25, Nathaniel Smith wrote: > pyproject.toml is just an example anyway; get_build_wheel_requires > runs arbitrary code, and that code could potentially return different > results in different trees. No, I don't want to give backends permission to work that

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nathaniel Smith
On Tue, Jun 27, 2017 at 9:29 PM, Nick Coghlan wrote: > Sorry, I also meant to reply to this part before hitting send. > > On 28 June 2017 at 13:43, Nathaniel Smith wrote: >> I would say that there's only one required path, which is in-place. >> (But the tree

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nick Coghlan
Sorry, I also meant to reply to this part before hitting send. On 28 June 2017 at 13:43, Nathaniel Smith wrote: > I would say that there's only one required path, which is in-place. > (But the tree that they do the in-place build in might have a more or > less complicated

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nathaniel Smith
On Tue, Jun 27, 2017 at 9:20 PM, Nick Coghlan wrote: > On 28 June 2017 at 13:43, Nathaniel Smith wrote: >> On Tue, Jun 27, 2017 at 4:20 AM, Nick Coghlan wrote: >>> On 27 June 2017 at 18:54, Nathaniel Smith wrote: On

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nick Coghlan
On 28 June 2017 at 13:43, Nathaniel Smith wrote: > On Tue, Jun 27, 2017 at 4:20 AM, Nick Coghlan wrote: >> On 27 June 2017 at 18:54, Nathaniel Smith wrote: >>> On Tue, Jun 27, 2017 at 12:27 AM, Nick Coghlan wrote: 2.

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nathaniel Smith
On Tue, Jun 27, 2017 at 4:20 AM, Nick Coghlan wrote: > On 27 June 2017 at 18:54, Nathaniel Smith wrote: >> On Tue, Jun 27, 2017 at 12:27 AM, Nick Coghlan wrote: >>> 2. If you don't find the input preparation hook: >>> >>> - call

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nick Coghlan
On 27 June 2017 at 18:54, Nathaniel Smith wrote: > On Tue, Jun 27, 2017 at 12:27 AM, Nick Coghlan wrote: >> 2. If you don't find the input preparation hook: >> >> - call `get_build_sdist_requires()` >> - call `get_build_wheel_requires()` >> - install both sets

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nathaniel Smith
On Tue, Jun 27, 2017 at 12:27 AM, Nick Coghlan wrote: > On 26 June 2017 at 22:36, Nathaniel Smith wrote: >> On Jun 25, 2017 12:46 AM, "Nick Coghlan" wrote: >> >> On 25 June 2017 at 17:41, Nathaniel Smith wrote: >>> Maybe

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nick Coghlan
On 27 June 2017 at 01:33, Daniel Holth wrote: > My impressions on reading what is hopefully the current version of the PEP > > Are there different paths to get to sdist/wheel for example tree -> prepare > sdist/wheel files -> build sdist and tree -> build sdist, tree -> build >

Re: [Distutils] Finishing up PEP 517

2017-06-27 Thread Nick Coghlan
On 26 June 2017 at 22:36, Nathaniel Smith wrote: > On Jun 25, 2017 12:46 AM, "Nick Coghlan" wrote: > > On 25 June 2017 at 17:41, Nathaniel Smith wrote: >> Maybe you're right and there are exactly 2 front-end use cases and it >> will turn out

Re: [Distutils] Finishing up PEP 517

2017-06-26 Thread Daniel Holth
My impressions on reading what is hopefully the current version of the PEP Are there different paths to get to sdist/wheel for example tree -> prepare sdist/wheel files -> build sdist and tree -> build sdist, tree -> build wheel depending on what [pip] decides to do? Should the frontend do both

Re: [Distutils] Finishing up PEP 517

2017-06-26 Thread Nathaniel Smith
On Jun 25, 2017 12:46 AM, "Nick Coghlan" wrote: On 25 June 2017 at 17:41, Nathaniel Smith wrote: > Maybe you're right and there are exactly 2 front-end use cases and it > will turn out that the current PEP addresses them perfectly. I don't > have a crystal

Re: [Distutils] Finishing up PEP 517

2017-06-25 Thread Nick Coghlan
On 25 June 2017 at 17:41, Nathaniel Smith wrote: > Maybe you're right and there are exactly 2 front-end use cases and it > will turn out that the current PEP addresses them perfectly. I don't > have a crystal ball; I'm making an argument from ignorance. I'm not - we have two

Re: [Distutils] Finishing up PEP 517

2017-06-25 Thread Thomas Kluyver
On Sun, Jun 25, 2017, at 08:41 AM, Nick Coghlan wrote: > Aside from not producing an archive, the bit that makes > `prepare_wheel_build_files` notably different from `build_sdist` is > that it relies on `get_build_wheel_requires` *not* on > `get_build_sdist_requires`: >

Re: [Distutils] Finishing up PEP 517

2017-06-25 Thread Nick Coghlan
On 25 June 2017 at 17:26, Nathaniel Smith wrote: > On Sat, Jun 24, 2017 at 7:57 AM, Thomas Kluyver 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

Re: [Distutils] Finishing up PEP 517

2017-06-25 Thread Nathaniel Smith
On Sun, Jun 25, 2017 at 12:26 AM, Nick Coghlan wrote: > On 25 June 2017 at 16:58, Nathaniel Smith wrote: >> The current spec's solution: >> >> - Let's define an exhaustive list of all the reasons you might want to >> make an sdist: >> 1) you're a

Re: [Distutils] Finishing up PEP 517

2017-06-25 Thread Nick Coghlan
On 25 June 2017 at 16:58, Nathaniel Smith wrote: > The current spec's solution: > > - Let's define an exhaustive list of all the reasons you might want to > make an sdist: > 1) you're a hypothetical future version of pip that has decided to > implement some specific

Re: [Distutils] Finishing up PEP 517

2017-06-25 Thread Nathaniel Smith
On Sat, Jun 24, 2017 at 7:57 AM, Thomas Kluyver 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

Re: [Distutils] Finishing up PEP 517

2017-06-25 Thread Nathaniel Smith
On Sat, Jun 17, 2017 at 7:41 AM, Nick Coghlan wrote: > On 17 June 2017 at 17:07, Nathaniel Smith wrote: >> On Fri, Jun 16, 2017 at 11:28 PM, Donald Stufft wrote: On Jun 16, 2017, at 11:08 PM, Nathaniel Smith wrote:

Re: [Distutils] Finishing up PEP 517

2017-06-24 Thread Thomas Kluyver
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. Thomas On Sat, Jun 24, 2017, at 02:44 PM, Thomas Kluyver wrote: > I

Re: [Distutils] Finishing up PEP 517

2017-06-24 Thread Thomas Kluyver
I have prepared a PR against the PEP adding get_build_sdist_requires , and renaming a couple of the other hooks for clarity (get_build_wheel_requires, prepare_build_wheel_files): https://github.com/python/peps/pull/297 ___ Distutils-SIG maillist -

Re: [Distutils] Finishing up PEP 517

2017-06-17 Thread Nick Coghlan
On 17 June 2017 at 17:07, Nathaniel Smith wrote: > On Fri, Jun 16, 2017 at 11:28 PM, Donald Stufft wrote: >>> >>> On Jun 16, 2017, at 11:08 PM, Nathaniel Smith wrote: >>> >>> (because the legacy setup.py >>> command errors out, because the

Re: [Distutils] Finishing up PEP 517

2017-06-17 Thread Paul Moore
On 17 June 2017 at 08:07, Nathaniel Smith wrote: > Proposal: "NotImplemented" is a legal return value from build_sdist > (similar to dunder methods), and should trigger whatever fallback > behavior the frontend would do if the hook was simply undefined. The PEP currently allows

Re: [Distutils] Finishing up PEP 517

2017-06-17 Thread Nathaniel Smith
On Fri, Jun 16, 2017 at 11:28 PM, Donald Stufft wrote: >> >> On Jun 16, 2017, at 11:08 PM, Nathaniel Smith wrote: >> >> (because the legacy setup.py >> command errors out, because the build_sdist hook is missing, because >> the build_sdist hook errors out...);

Re: [Distutils] Finishing up PEP 517

2017-06-17 Thread Donald Stufft
> > On Jun 16, 2017, at 11:08 PM, Nathaniel Smith wrote: > > (because the legacy setup.py > command errors out, because the build_sdist hook is missing, because > the build_sdist hook errors out...); probably falling back on > shutil.copytree. Ah okay. This is where the

Re: [Distutils] Finishing up PEP 517

2017-06-16 Thread Nathaniel Smith
On Fri, Jun 16, 2017 at 7:48 PM, Nick Coghlan wrote: > On 17 June 2017 at 07:48, Nathaniel Smith wrote: >> 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

Re: [Distutils] Finishing up PEP 517

2017-06-16 Thread Nathaniel Smith
On Fri, Jun 16, 2017 at 5:52 PM, Donald Stufft wrote: > I’d probably want to spec this out as ext_{name-on-pypi}_* to remove a > special case on pip in the PEP, to let others do experimentation as well. Sure, like the [tool.*] escape hatch in pyproject.toml. > However this

Re: [Distutils] Finishing up PEP 517

2017-06-16 Thread Nick Coghlan
On 17 June 2017 at 07:48, Nathaniel Smith wrote: > 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

Re: [Distutils] Finishing up PEP 517

2017-06-16 Thread Nick Coghlan
On 17 June 2017 at 08:05, Thomas Kluyver wrote: > On Fri, Jun 16, 2017, at 10:48 PM, Nathaniel Smith wrote: >> 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

Re: [Distutils] Finishing up PEP 517

2017-06-16 Thread Donald Stufft
> On Jun 16, 2017, at 5:48 PM, Nathaniel Smith wrote: > > On Fri, Jun 16, 2017 at 2:08 AM, Thomas Kluyver > wrote: >> >> On Fri, Jun 16, 2017, at 08:41 AM, Nick Coghlan wrote: I think we should rename get_build_requires

Re: [Distutils] Finishing up PEP 517

2017-06-16 Thread Donald Stufft
> On Jun 16, 2017, at 6:05 PM, Thomas Kluyver wrote: > > On Fri, Jun 16, 2017, at 10:48 PM, Nathaniel Smith wrote: >> The messy complications come from >> prepare_wheel_metadata and get_prepare_wheel_input_files, which isn't >> surprising, since those are the two hooks

Re: [Distutils] Finishing up PEP 517

2017-06-16 Thread Thomas Kluyver
On Fri, Jun 16, 2017, at 10:48 PM, Nathaniel Smith wrote: > 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

Re: [Distutils] Finishing up PEP 517

2017-06-16 Thread Nathaniel Smith
On Fri, Jun 16, 2017 at 2:08 AM, Thomas Kluyver 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: > > > > > >

Re: [Distutils] Finishing up PEP 517

2017-06-16 Thread Thomas Kluyver
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 > >

Re: [Distutils] Finishing up PEP 517

2017-06-16 Thread Nick Coghlan
Thanks for continuing to push us forward on this, Thomas :) A small PEP readability request: given how the number of hooks has grown, could we get a section that just lists the required hooks and the optional hooks? Alternatively, give each hook its own subsection under "Build backend

Re: [Distutils] Finishing up PEP 517

2017-06-15 Thread Nathaniel Smith
On Thu, Jun 15, 2017 at 6:12 AM, Thomas Kluyver wrote: > Yes, it's PEP 517 again! Here's the current text: > > https://www.python.org/dev/peps/pep-0517/ > > We currently say: > >> All other hooks [except get_build_requires] are executed in an environment >> which contains

[Distutils] Finishing up PEP 517

2017-06-15 Thread Thomas Kluyver
Yes, it's PEP 517 again! Here's the current text: https://www.python.org/dev/peps/pep-0517/ We currently say: > All other hooks [except get_build_requires] are executed in an environment > which contains both the bootstrap requirements specified in the > pyproject.toml hook and those