[Distutils] Environment marker expression types

Nick Coghlan ncoghlan at gmail.com
Fri Apr 26 04:22:18 CEST 2013


On Fri, Apr 26, 2013 at 11:56 AM, Daniel Holth <dholth at gmail.com> wrote:
> requires :  [ { condition : "foo == 'gurgle'", requirements : [ "bar",
> "baz" ] } , { requirements : [ "quux", "splort" ] } ]
>
> for a conditional and unconditional requirement.
>
> This syntax would also avoid putting data in keys which seems to be fashionable.

Good point, I realised "conditional" would be better as a list of
mappings with conditions as a field rather than a mapping with
conditions as keys:


    "requires": ["projectA", "projectB"]
    "conditional": [
        {
            "condition": "sys.platform == 'win32'",
            "requires": ["pywin32 (>1.0)"]
        }
   ]

I definitely prefer separating out the conditional data from the
unconditional data, though - keep in mind that this spec also defines
the runtime API for accessing this info as structured metadata.

Cheers,
Nick.

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


More information about the Distutils-SIG mailing list