[Distutils] A possible refactor/streamlining of PEP 517

Nick Coghlan ncoghlan at gmail.com
Fri Jul 7 23:45:20 EDT 2017


On 7 July 2017 at 23:23, Daniel Holth <dholth at gmail.com> wrote:
> FYI distutils supports out of tree builds too. It is the -b argument to
> 'setup.py build'.

Sort of. That's short for "--bdist-dir" and tells distutils/setuptools
not to use the "dist/" subdirectory for either build trees or the
build artifacts. It doesn't say anything about where intermediate
artifacts generated by compilers etc should end up.

For a hypothetical PEP 517 setuptools/distutils backend, I'd suggest
an implementation that:

- passed "--bdist-dir=<wheel_directory>" to "bdist_wheel"
- copied the input files into the specific directory when
"build_directory" was set and then did a normal in-place build in that
directory

Whereas for enscons, you could presumably just set "variant_dir"
appropriately in the SConscript call (which, as it turns out, works by
copying the input files to the designated build directory:
http://scons.org/doc/2.1.0/HTML/scons-user/x3398.html).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Distutils-SIG mailing list