Commit 35505947 authored by Łukasz Nowak's avatar Łukasz Nowak

Simple implementation of fetching and setting profile location base location.

parent 90302f13
...@@ -1514,6 +1514,22 @@ def _open(base, filename, seen, dl_options, override, downloaded): ...@@ -1514,6 +1514,22 @@ def _open(base, filename, seen, dl_options, override, downloaded):
filename) filename)
result[section] = options result[section] = options
# find and expose _profile_base_location_ and _profile_location_
for section, value in result.iteritems():
_profile_base_location_ = None
_profile_location_ = None
for k,v in value.iteritems():
if '${:_profile_base_location_}' in v:
_profile_base_location_ = base
if '${:_profile_location_}' in v:
_profile_location_ = filename
if _profile_base_location_ is not None and _profile_location_ is not None:
break
if _profile_base_location_ is not None:
value['_profile_base_location_'] = _profile_base_location_
if _profile_location_ is not None:
value['_profile_location_'] = _profile_location_
result = _annotate(result, filename) result = _annotate(result, filename)
if root_config_file and 'buildout' in result: if root_config_file and 'buildout' in result:
......
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