[jhbuild/wip/path-env: 2/15] setup_env(): remove non-environment stuff
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/wip/path-env: 2/15] setup_env(): remove non-environment stuff
- Date: Wed, 12 Mar 2014 23:59:38 +0000 (UTC)
commit 41e2abd06d704693b3c149a4c068f06515c7accf
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Mar 10 00:18:07 2014 -0400
setup_env(): remove non-environment stuff
Remove code not directly related to setting up environment variables out
of setup_env() and into separate functions (which we call directly from
the one place where setup_env() is called).
jhbuild/config.py | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index e25427f..6d45c70 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -276,7 +276,10 @@ class Config:
modify_conditions(self._config['conditions'], conditions_modifiers)
self.load(filename)
modify_conditions(self.conditions, conditions_modifiers)
+
+ self.create_directories()
self.setup_env()
+ self.update_build_targets()
def reload(self):
os.environ = self._orig_environ.copy()
@@ -400,9 +403,7 @@ class Config:
def get_original_environment(self):
return self._orig_environ
- def setup_env(self):
- '''set environment variables for using prefix'''
-
+ def create_directories(self):
if not os.path.exists(self.prefix):
try:
os.makedirs(self.prefix)
@@ -416,6 +417,9 @@ class Config:
raise FatalError(
_('working directory (%s) can not be created') % self.top_builddir)
+ def setup_env(self):
+ '''set environment variables for using prefix'''
+
os.environ['JHBUILD_PREFIX'] = self.prefix
os.environ['UNMANGLED_LD_LIBRARY_PATH'] = os.environ.get('LD_LIBRARY_PATH', '')
@@ -646,8 +650,6 @@ class Config:
valarr.remove(x)
os.environ['LD_PRELOAD'] = ' '.join(valarr)
- self.update_build_targets()
-
def update_build_targets(self):
# update build targets according to old flags
if self.makecheck and not 'check' in self.build_targets:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]