diff options
author | Monty Taylor <mordred@inaugust.com> | 2013-07-21 09:35:17 -0700 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2013-07-21 11:41:34 -0700 |
commit | c84876dc0f559a66fec19b2f81f5717204b253e2 (patch) | |
tree | bfc85ea4893b5a82c3e5263d9459b80590262f56 /pbr/util.py | |
parent | 71bea435b6f73644d5d7320001ac56d78bcc4687 (diff) | |
download | pbr-c84876dc0f559a66fec19b2f81f5717204b253e2.tar.gz |
Remove the need to specify the pbr hook
If you're running pbr codepaths, you want the hook. There is no need
to say "pbr=True" in setup.py and then to list the hook in setup.cfg
now that d2to1 is in the tree.
Change-Id: Ie33d3e08d5a4133f5caf2613859919ce4f02c4a0
Diffstat (limited to 'pbr/util.py')
-rw-r--r-- | pbr/util.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pbr/util.py b/pbr/util.py index 353635e..3faa58e 100644 --- a/pbr/util.py +++ b/pbr/util.py @@ -77,6 +77,7 @@ try: except ImportError: import ConfigParser as configparser +import pbr.hooks # A simplified RE for this; just checks that the line ends with version # predicates in () @@ -219,7 +220,9 @@ def cfg_to_args(path='setup.cfg'): try: if setup_hooks: - setup_hooks = split_multiline(setup_hooks) + setup_hooks = [ + hook for hook in split_multiline(setup_hooks) + if hook != 'pbr.hook.setup_hook'] for hook in setup_hooks: hook_fn = resolve_name(hook) try : @@ -233,6 +236,9 @@ def cfg_to_args(path='setup.cfg'): log.error(traceback.format_exc()) sys.exit(1) + # Run the pbr hook + pbr.hooks.setup_hook(config) + kwargs = setup_cfg_to_setup_kwargs(config) # Set default config overrides |