[Distutils] Static metadata using setup.cfg
David Lyon
david.lyon at preisshare.net
Tue Sep 8 00:54:11 CEST 2009
On Mon, 7 Sep 2009 17:41:40 +0200, Tarek Ziadé <ziade.tarek at gmail.com>
wrote:
>> I'd prefer setup.cfg to be totally static. If there are complicated
>> if/then/else's needed, they should be in setup.py.
+1
> The template engine will be restricted to "if", and the expression
> will be able to ^may only 3 values:
>
> - the python version
> - sys.platform
> - os.name
That's very, very hard....
It makes it harder for the developer because they must learn yet
another templating system. Add half a days work to every developer.
>> As soon as this file becomes dynamic, we're back in the situation where
>> you
>> can't tell what a package requires without installing it, which is
>> something
>> I'd really like to not have to do.
+1
> setup.cfg stays static. We're talking about the ability to add a
> setup.cfg.in file,
> that generates the setup.cfg file ***without having to run any third
> party code***.
>
> So again, this will not require any installation to run since
transforming
> a "setup.cfg.in" into a "setup.cfg" will just require a vanilla Python
It's still just overly complicated..
> to synthetize =
>
> if exists(setup.cfg.in):
> setup.cfg = distutils.some_func(setup.cfg.in)
> else:
> nothing
>
> That's the whole point ! ;)
Point is to introduce distutils? haha - why not just use setuptools?
> It means that people will be able to read the .cfg file, and if needed
> to rebuild for their platform
> without any installation required.
>
> Eventually, PyPI can provide both (.cfg and .cfg.in) as metadata that a
> tool can
> grab to see what's required for installation, *without installing the
> package*
I can see your intentions here are good. But what you are suggesting is
just overly complicated for what is required. There's no need for a
templating engine, in this part of distutils.
Yes, introducing a template engine might be good for multi-platform
output.
But the setup.py and setup.cfg and [setup] sections must be readily
understood by the complete novice. That's the point that you don't
seem to understand yet. Stop making it non-obvious.
No installation system I have ever heard of makes it mandatory
to understand a template system to be able to write your "hello
world - I'm installed".... script..
Especially when the alternative is just "if os.name == "win32:"
..
I see nothing wrong with such a simple piece of python code...
Regards
David
More information about the Distutils-SIG
mailing list