[Distutils] comparison of configuration languages

Ethan Furman ethan at stoneleaf.us
Mon May 9 19:56:42 EDT 2016


On 05/06/2016 07:59 PM, Nathaniel Smith wrote:

> Here's that one-stop writeup/comparison of all the major configuration
> languages that I mentioned:
>
> https://gist.github.com/njsmith/78f68204c5d969f8c8bc645ef77d4a8f

Very nice work-up, thanks!

<shameless-plug>
However, you didn't include XML -- which, while absolutely horrid, can 
be quite readable with the appropriate preprocessor, such as xaml [1] 
</shameless plug>:

--- 8< whatever.xaml ---------------------------------------------------
!!! xml1.0
~base

     ~schema
         // optional
         ~version: 1

     ~bootstrap
         ~requirements
             // Temporarily commented out 2016-01-10
             // magic-build-helper
             ~setuptools
                 ~version: >= 27
             // for the new frobnicate feature
             ~numpy
                 ~version: >= 1.10
             //Pinned until we get a fix for
             // @https://github.com/cyberdyne/the-versionator/issues/123
             ~the-versionator
                 ~version: 0.13

// The owner of pypi name "flit" decides what goes under the
// extension: flit:
// key
~extensions
     ~flit
         ~whatever: true
--- 8< -----------------------------------------------------------------

which ends up as:

--- 8< whatever.xml ----------------------------------------------------
<?xml version="1.0"?>
<base>

     <schema>
         <!--
          |  optional
         -->
         <version>1</version>
     </schema>

     <bootstrap>
         <requirements>
             <!--
              |  Temporarily commented out 2016-01-10
              |  magic-build-helper
             -->
             <setuptools>
                 <version>>= 27</version>
             </setuptools>
             <!--
              |  for the new frobnicate feature
             -->
             <numpy>
                 <version>>= 1.10</version>
             </numpy>
             <!--
              |  Pinned until we get a fix for
              |  @https://github.com/cyberdyne/the-versionator/issues/123
             -->
             <the-versionator>
                 <version>0.13</version>
             </the-versionator>
         </requirements>
     </bootstrap>

</base>

<!--
  |  The owner of pypi name "flit" decides what goes under the
  |  extension: flit:
  |  key
-->
<extensions>
     <flit>
         <whatever>true</whatever>
     </flit>
</extensions>
--- 8< -----------------------------------------------------------------

--
~Ethan~

[1] https://pypi.python.org/pypi/xaml


More information about the Distutils-SIG mailing list