[Distutils] setup.cfg new format proposal
Tarek Ziadé
ziade.tarek at gmail.com
Fri Sep 11 16:33:27 CEST 2009
Hello
here's a detailed proposal for the setup.cfg format. I've included all remarks,
and tried to make the syntax as simple as possible. I've dropped the
long_description
stuff and the template language stuff. (people can do it as a
post-release process)
A/ Config file structure:
"""
[setup]
foo: bar
conditional-sections: one, two
[one]
condition: test
[two]
condition: test
"""
2/ Execution environment:
python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
os_name = os.name
platform = sys.platform
uname = os.uname()
python_version_info = sys.version_info
3/ Grammar:
comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'|'is'|'is' 'not'
comparison: expr (comp_op expr)*
expr: 'python_version'|'python_version_info'|'os_name'|'uname'|'platform'|STRING
test: or_test
or_test: and_test ('or' and_test)*
and_test: not_test ('and' not_test)*
not_test: 'not' not_test | comparison
4/ Process
distutils will interpret [setup] and act upon, to fill the
Distribution object and its metadata attribute object.
It will look only for Metadata fields and ignores the others.
In case an option is passed in setup.py, it overrides the one in setup.cfg.
Let me know if it's good enough. I won't write a PEP for this change,
and I will just push it for information at python-dev as soon as I get
enough +1 :)
Regards
Tarek
--
Tarek Ziadé | http://ziade.org | オープンソースの岩!
More information about the Distutils-SIG
mailing list