[Distutils] PEP for specifying build dependencies
Nick Coghlan
ncoghlan at gmail.com
Wed May 11 03:11:54 EDT 2016
On 11 May 2016 at 10:39, Brett Cannon <brett at python.org> wrote:
> Donald, Nathaniel, and I have finished our proposed PEP for specifying a
> projects' build dependencies. The PEP is being kept at
> https://github.com/brettcannon/build-deps-pep, so if you find spelling
> mistakes and grammatical errors please feel free to send a PR to fix them.
>
> The only open issue in the PEP at the moment is the bikeshedding topic of
> what to name the sub-section containing the requirements: `[package.build]`
> or `[package.build-system]` (we couldn't reach consensus among the three of
> us on this). Otherwise the three of us are rather happy with the way the PEP
> has turned out and look forward to this being the first step towards
> allowing projects to customize their build process better!
I prefer [package.build-system]. My rationale for that is that the
build system may have *its own* configuration mechanism, separate from
this file, and I don't want people to get confused between a project's
"build settings" and its "build system identification".
Take the default case: for a distutils/setuptools based project, the
actual build settings are the arguments to setup() in setup.py, *not*
these new settings in pyproject.toml. By contrast, the settings in
[package.build-system] are the ones that tell pip and other installers
what is needed to make "setup.py bdist_wheel" work (and, in the
future, will tell them when to invoke something other than "setup.py
bdist_wheel" to do the binary build)
> For the vast majority of Python projects that rely upon setuptools,
> the ``pyproject.toml`` file will be::
>
> [package.build-system]
> requires = ['setuptools', 'wheel'] # PEP 508 specifications.
It would be worthwhile showing an example of using the new mechanism
to bootstrap a project that relies on numpy.distutils.
> Open Issues
> ===========
>
> Name of the build-related sub-table
> -----------------------------------
>
> The authors of this PEP couldn't decide between the names
> ``[package.build]`` and ``[package.build-system]``, and so it is an
> open issue over which one to go with.
"package.build-system", for the reason given above (i.e. "build"
conflicts with the project's actual build settings).
> Rejected Ideas
> ==============
>
> Other semantic version key names
> --------------------------------
>
> Names other than ``semantics-version`` were considered to represent
> the version of semantics that the configuration file was written for.
> Both ``configuration-version`` and ``metadata-version`` were both
> considered, but were rejected due to how people may confuse the
> key as representing a version of the files contents instead of the
> version of semantics that the file is interpreted under.
Would you be open to using schema-version rather than
semantic-version, and then formally defining the format via jsonschema
and/or JSL [1]?
Cheers,
Nick.
[1] The latter is like an ORM for jsonschema: https://pypi.python.org/pypi/jsl
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Distutils-SIG
mailing list