Skip to content

Commit 4e19f18

Browse files
committed
- fixed build issue with mingw (bug 2834969)
1 parent f179a18 commit 4e19f18

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

SConstruct

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,18 @@ if not os.path.exists( sconsign_dir_path ):
115115
# Store all dependencies signature in a database
116116
SConsignFile( sconsign_path )
117117

118-
env = Environment( ENV = {'PATH' : os.environ['PATH']},
118+
def make_environ_vars():
119+
"""Returns a dictionnary with environment variable to use when compiling."""
120+
# PATH is required to find the compiler
121+
# TEMP is required for at least mingw
122+
vars = {}
123+
for name in ('PATH', 'TEMP', 'TMP'):
124+
if name in os.environ:
125+
vars[name] = os.environ[name]
126+
return vars
127+
128+
129+
env = Environment( ENV = make_environ_vars(),
119130
toolpath = ['scons-tools'],
120131
tools=[] ) #, tools=['default'] )
121132

0 commit comments

Comments
 (0)