[Distutils] Static metadata using setup.cfg
P.J. Eby
pje at telecommunity.com
Mon Aug 17 15:32:25 CEST 2009
At 09:34 AM 8/17/2009 +0200, Tarek Ziadé wrote:
>Right now the behavior of the code is:
>
>Distutils will take the setup.cfg options and apply them to the
>Distribution class,
>overriding any argument passed to setup(), then they will be in turn
>overriden by
>the command line options if any.
>
>This behavior seems fine.
>
>Now there's a very small change to make in distutils to make this work,
>wich consists of applying these values to the DistutilsMetadata
>object (the metadata attribute in the dist instance)
>
>I've changed this in my working trunk to give a try, and it works fine.
Are you doing this in setup(), Distribution.__init__,
Distribution.parse_config_files(), Distribution.finalize_options(),
or somewhere else? I'm a bit concerned about backward compatibility,
and integrating e.g. setup_requires.
One of the consequences of this approach would be that if setuptools
tried to support setup_requires this way, it could end up running
recursively by endlessly re-parsing the same configuration file, and
then creating a new distribution to do the installation, which in
turn would parse the config file and see a setup_requires, and so on.
More information about the Distutils-SIG
mailing list