diff options
author | PJ Eby <distutils-sig@python.org> | 2005-07-08 05:09:23 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-07-08 05:09:23 +0000 |
commit | 6050f5361738831a12debd373b9016a077e930df (patch) | |
tree | 25e82b1ab87651a118c178191776e19575dd4bab /setuptools/command/saveopts.py | |
parent | 592269afeaa4f96bddbaa8b6fbe8dddcea2445a4 (diff) | |
download | external_python_setuptools-6050f5361738831a12debd373b9016a077e930df.tar.gz external_python_setuptools-6050f5361738831a12debd373b9016a077e930df.tar.bz2 external_python_setuptools-6050f5361738831a12debd373b9016a077e930df.zip |
Added support for defining command aliases in distutils configuration
files, under the "[aliases]" section. To prevent recursion and to allow
aliases to call the command of the same name, a given alias can be expanded
only once per command-line invocation. You can define new aliases with the
"alias" command, either for the local, global, or per-user configuration.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041094
Diffstat (limited to 'setuptools/command/saveopts.py')
-rwxr-xr-x | setuptools/command/saveopts.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/setuptools/command/saveopts.py b/setuptools/command/saveopts.py index ad3cf193..1180a440 100755 --- a/setuptools/command/saveopts.py +++ b/setuptools/command/saveopts.py @@ -7,21 +7,19 @@ class saveopts(option_base): description = "save supplied options to setup.cfg or other config file" - user_options = option_base.user_options + [ - ] - - boolean_options = option_base.boolean_options + [ - ] - def run(self): dist = self.distribution commands = dist.command_options.keys() settings = {} + for cmd in commands: + if cmd=='saveopts': - continue + continue # don't save our own options! + for opt,(src,val) in dist.get_option_dict(cmd).items(): if src=="command line": settings.setdefault(cmd,{})[opt] = val + edit_config(self.filename, settings, self.dry_run) |