Commit c8245829 authored by Xavier Thompson's avatar Xavier Thompson

recipe/promise_plugin: Add extra-paths option

parent 99cf4bfd
......@@ -127,8 +127,18 @@ class Recipe(GenericBaseRecipe):
for key in self.options
if key.startswith('config-')}
sys_paths = [dist.location for dist in working_set]
extra_paths = self.options.get('extra-paths')
if extra_paths:
for p in extra_paths.splitlines():
p = p.strip()
if p:
if not os.path.isdir(p):
raise ValueError("Invalid extra path %s" % p)
sys_paths.append(p)
return self.createFile(self.options['output'], script_template % {
'path': pformat([dist.location for dist in working_set], indent=2),
'path': pformat(sys_paths, indent=2),
'content': content_string,
'config': pformat(config_dict, indent=2),
}, int(self.options.get('mode', '0644'), 8)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment