Commit 09e68ba5 authored by Julien Muchembled's avatar Julien Muchembled

Expand environment variables during install (rather than during init)

In conjunction with the new Options.barrier() in buildout,
parts will be able to modify the environment during install/update.
parent 772a4579
......@@ -140,11 +140,6 @@ class Recipe(object):
if options.get('configure-command') == 'cygport':
self.environ.setdefault('CYGCONF_PREFIX', options['prefix'])
# Extrapolate the environment variables using values from the current
# environment.
for key in self.environ:
self.environ[key] = self.environ[key] % os.environ
def augmented_environment(self):
"""Returns a dictionary containing the current environment variables
augmented with the part specific overrides.
......@@ -274,6 +269,11 @@ class Recipe(object):
log.info('This shared package has been installed by other package')
return parts
# Extrapolate the environment variables using values from the current
# environment.
for key in self.environ:
self.environ[key] %= os.environ
make_cmd = self.options.get('make-binary', 'make').strip()
make_options = ' '.join(self.options.get('make-options', '').split())
make_targets = ' '.join(self.options.get('make-targets', 'install').split())
......
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