[Distutils] PEP for specifying build dependencies

Nathaniel Smith njs at pobox.com
Wed May 11 03:28:41 EDT 2016


On Wed, May 11, 2016 at 12:11 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 11 May 2016 at 10:39, Brett Cannon <brett at python.org> wrote:
[...]
>> 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.

It's just that with "numpy" added, but sure.

@Brett: I also just noticed reading the example above that you're
using single-quotes for strings in the TOML instead of double-quote
strings, which is a bit odd -- single quote strings in TOML are the
same as raw strings in Python, which does work for this case but
probably isn't the example we want to set.
>> 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]?

I kinda like the semantics-version name (schema = structure, semantics
= structure + interpretation), and I'm not sure what the name of that
key has to do with defining a json schema, but anyway, here's a
first-pass json schema :-)

https://gist.github.com/njsmith/89021cd9ef1a6724579229de164d02d2

(NOTE that that schema's written to check that a file matches the
currently defined spec, and should NOT be used to validate real
pyproject.toml files, because the additionalProperties: false keys
will cause it to error out on future backwards-compatible changes.)

-n

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the Distutils-SIG mailing list