[Distutils] moving things forward (was: wheel including files it shouldn't)
Leonardo Rochael Almeida
leorochael at gmail.com
Fri May 6 12:48:13 EDT 2016
On 6 May 2016 at 13:15, Chris Barker <chris.barker at noaa.gov> wrote:
> On Fri, May 6, 2016 at 5:41 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
>> [...]
>
>
>
>> So rather than saying "the bootstrapping dependency declaration file
>> is Python-but-not-really", it's easier to say "it's an ini-file format
>> that can be parsed with the configparser module" or "it's JSON" (I'm
>> ruling out any options that don't have a stdlib parser in Python 2.7)
>>
>
> Last time, I promise :-)
>
> "python literals" is perfectly well defined -- both by the language
> reference, and by "can be parsed by ast.literal_eval"
>
> and it addresses the limitations of JSON and is fully declarative.
>
There is actually prior art for that kind of use. Odoo uses such a language
for its addons system, including package dependencies. See example file
here:
https://github.com/OCA/maintainer-tools/blob/master/template/module/__openerp__.py
Notice the `depends` key, that lists other addons, and the
`external_dependencies` key that can list both python distribution
dependencies as well as external program dependencies.
ISTM the reluctance in adopting this idea comes from the desire of using
other programming languages to parse the bootstraping information (imagine
an sdist -> deb converter implemented in go. It will have to exec python
eventually, during the build process, but not before it has prepared the
build environment).
And even though, unlike JSON, the ConfigParser format of setup.cfg is not
officially defined anywhere, there are sufficiently compatible ini parsers
in other languages that the idea still has merit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160506/a42971df/attachment.html>
More information about the Distutils-SIG
mailing list