[Distutils] Configuration via imperative or declarative language (was: Static metadata using setup.cfg)

Ben Finney ben+python at benfinney.id.au
Wed Sep 9 01:56:53 CEST 2009


Eric Smith <eric at trueblade.com> writes:

> setup.cfg should be entirely static except for some simple
> if-then-else logic involving versions, as Tarek has described earlier.
> That is, it should only contain logic that needs to be decided on the
> platform where the installation is taking place. This is basically
> what RPM provides.

Floris Bruynooghe <floris.bruynooghe at gmail.com> writes:

> I'm more in favour of your original idea to have setup.cfg being
> completely static and have the if/else logic in setup.cfg.in.

A word on terminology here: The distinction being drawn isn't anything
to do with “static” (since even a ‘foo.py’ file is static, i.e. the file
doesn't change).

Instead, the distinction is whether or not ‘setup.cfg’ should be purely
declarative <URL:http://en.wikipedia.org/wiki/Declarative_programming>.
That is, whether it should:

* specify “what”, not “how”
* have no side-effects when used

The metadata being discussed is static. What's at issue is how that
metadata should be encoded: in an imperative language (like a Python
program file) or a declarative language (like a ConfigParser file).

-- 
 \     “Creativity can be a social contribution, but only in so far as |
  `\            society is free to use the results.” —Richard Stallman |
_o__)                                                                  |
Ben Finney



More information about the Distutils-SIG mailing list