diff options
Diffstat (limited to 'pbr/util.py')
-rw-r--r-- | pbr/util.py | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/pbr/util.py b/pbr/util.py index 214cacf..1682b66 100644 --- a/pbr/util.py +++ b/pbr/util.py @@ -77,6 +77,7 @@ try: except ImportError: import configparser +from pbr import extra_files import pbr.hooks # A simplified RE for this; just checks that the line ends with version @@ -258,23 +259,9 @@ def cfg_to_args(path='setup.cfg'): wrap_commands(kwargs) # Handle the [files]/extra_files option - extra_files = has_get_option(config, 'files', 'extra_files') - if extra_files: - extra_files = split_multiline(extra_files) - # Let's do a sanity check - for filename in extra_files: - if not os.path.exists(filename): - raise DistutilsFileError( - '%s from the extra_files option in setup.cfg does not ' - 'exist' % filename) - # Unfortunately the only really sensible way to do this is to - # monkey-patch the manifest_maker class - @monkeypatch_method(manifest_maker) - def add_defaults(self, extra_files=extra_files, log=log): - log.info('[pbr] running patched manifest_maker command ' - 'with extra_files support') - add_defaults._orig(self) - self.filelist.extend(extra_files) + files_extra_files = has_get_option(config, 'files', 'extra_files') + if files_extra_files: + extra_files.set_extra_files(split_multiline(files_extra_files)) finally: # Perform cleanup if any paths were added to sys.path |