
On Fri, Jul 7, 2017 at 12:59 AM, Thomas Kluyver <thomas@kluyver.me.uk> wrote:
On Thu, Jul 6, 2017, at 11:51 PM, Paul Moore wrote:
On reflection, I'm less concerned about this than I was. If you wanted to propose a stripped down version of PEP 517 which assumed it was the backend's responsibility to ensure reproducible isolated builds, I'd be willing to listen. But the proposal would need to include some pretty strong requirements on precisely what we're asking of backends - if build isolation is pip's problem to solve, then I'm happy for us (the pip devs) to take that responsibility, and agree hooks that we need to do so, but if we're assuming backends handle it for us, I think we need to document clearly what we're assuming (because frankly, the pip devs are the ones with the experience of the potential issues).
How does this sound to you:
""" If build_directory is not None, it is a unicode string containing the path to a directory where intermediate build artifacts may be stored. This may be empty, or it may contain artifacts from a previous build to be used as a cache. The backend is responsible for determining whether any cached artifacts are outdated. When a build_directory is provided, the backend should not create or modify any files in the source directory (the working directory where the hook is called). If the backend cannot reliably avoid modifying the directory it builds from, it should copy any files it needs to build_directory and perform the build there.
I think this is a really interesting idea, but it makes me very nervous that we're starting design work on novel features when we still haven't finalized a basic build_wheel hook. PEP 517 was written in 2015... This proposal creates substantial complications for build systems that default to doing in-place builds, which is almost all existing system from 'make' onwards. Legacy build systems often can't do out-of-tree builds at all (e.g. consider the case where you have a vendored C library whose build system you want to einvoke as part of your build). Is this a problem? The benefits are potentially large, but are they worth it if they increase the barrier to entry for new build systems? I'm not sure how to tell. And in the mean time, pip is still unconditionally calling copytree before even looking at the source tree... Is it absolutely necessary to get this into the first PEP? -n -- Nathaniel J. Smith -- https://vorpus.org