summaryrefslogtreecommitdiff
path: root/pbr/util.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-08-04 18:17:20 +0000
committerGerrit Code Review <review@openstack.org>2013-08-04 18:17:20 +0000
commit270594f4e12dd3d2ce94e2e32128d72aba490cd6 (patch)
treee441196b2b43e9beb6689ba233967b58e54bbf37 /pbr/util.py
parent8e92bb2d322e9b3e5fcd638daeff5185cea872df (diff)
parentd26d43014b9202437d276be298539efddbc914e3 (diff)
downloadpbr-270594f4e12dd3d2ce94e2e32128d72aba490cd6.tar.gz
Merge "Replace setuptools_git with a smarter approach"0.5.21
Diffstat (limited to 'pbr/util.py')
-rw-r--r--pbr/util.py21
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