summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2012-08-09 10:59:47 +0200
committerAndoni Morales Alastruey <ylatuya@gmail.com>2012-08-09 11:02:43 +0200
commit1e39cafcc47fb55bd1eb1c170c1cf43df30ead5b (patch)
treee738ce22cf8fd75166e093c67c5495b0e36dce30
parent1645db81043cf49920a6115bddf4b26124dc7b84 (diff)
config: setup the main environment properly in a multiconf scenario
-rw-r--r--cerbero/config.py7
-rw-r--r--test/test_cerbero_config.py2
2 files changed, 2 insertions, 7 deletions
diff --git a/cerbero/config.py b/cerbero/config.py
index 97224a53..14b8a78f 100644
--- a/cerbero/config.py
+++ b/cerbero/config.py
@@ -113,8 +113,7 @@ class Config (object):
config.validate_properties()
config._raw_environ = os.environ.copy()
- self._restore_environment()
- self.setup_env()
+ self.do_setup_env()
# Store current os.environ data
for c in self.arch_config.values():
@@ -151,10 +150,6 @@ class Config (object):
for e, v in self.env.iteritems():
os.environ[e] = v
- def setup_env(self):
- for c in self.arch_config.values():
- c.do_setup_env()
-
def get_env(self, prefix, libdir, py_prefix):
# Get paths for environment variables
includedir = os.path.join(prefix, 'include')
diff --git a/test/test_cerbero_config.py b/test/test_cerbero_config.py
index c9b4ed25..8baf0edb 100644
--- a/test/test_cerbero_config.py
+++ b/test/test_cerbero_config.py
@@ -142,7 +142,7 @@ class LinuxPackagesTest(unittest.TestCase):
tmpdir = tempfile.mkdtemp()
config.prefix = tmpdir
config.load_defaults()
- config.setup_env()
+ config.do_setup_env()
env = config.get_env(tmpdir, os.path.join(tmpdir, 'lib'),
config.py_prefix)
for k, v in env.iteritems():