From ea04b18c0ab71f4aff53334e9ba39870ffe45bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Wed, 7 Jun 2006 15:30:50 +0000 Subject: [PATCH] fix previous commit --- pisi/actionsapi/variables.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/pisi/actionsapi/variables.py b/pisi/actionsapi/variables.py index 48556714..6644212e 100644 --- a/pisi/actionsapi/variables.py +++ b/pisi/actionsapi/variables.py @@ -11,8 +11,7 @@ # Please read the COPYING file. # Standard Python Modules -from os import getenv -from os import environ +import os from copy import deepcopy # Pisi-Core Modules @@ -24,19 +23,18 @@ def exportFlags(): '''General flags used in actions API.''' # first reset environ - environ = {} - environ = deepcopy(ctx.config.environ) + os.environ = {} + os.environ = deepcopy(ctx.config.environ) # Build systems depend on these environment variables. That is why # we export them instead of using as (instance) variables. values = ctx.config.values - environ['HOST'] = values.build.host - environ['CFLAGS'] = values.build.cflags - environ['CXXFLAGS'] = values.build.cxxflags - environ['LDFLAGS'] = values.build.ldflags - environ['USER_LDFLAGS'] = values.build.ldflags - environ['JOBS'] = values.build.jobs - + os.environ['HOST'] = values.build.host + os.environ['CFLAGS'] = values.build.cflags + os.environ['CXXFLAGS'] = values.build.cxxflags + os.environ['LDFLAGS'] = values.build.ldflags + os.environ['USER_LDFLAGS'] = values.build.ldflags + os.environ['JOBS'] = values.build.jobs class Env(object): '''General environment variables used in actions API''' @@ -63,7 +61,7 @@ class Env(object): # Using environment variables is somewhat tricky. Each time # you need them you need to check for their value. if self.__vars.has_key(attr): - return getenv(self.__vars[attr]) + return os.getenv(self.__vars[attr]) else: return None