Port SCons scripts to py3k (xantares/py3k PR)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7124 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2b18e58040
commit
d8eb1c60bb
4 changed files with 25 additions and 26 deletions
|
@ -106,7 +106,7 @@ def shlib_emitter(target, source, env):
|
|||
no_import_lib = env.get('no_import_lib', 0)
|
||||
|
||||
if not dll:
|
||||
raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
|
||||
raise SCons.Errors.UserError("A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX"))
|
||||
|
||||
if not no_import_lib and \
|
||||
not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'):
|
||||
|
@ -149,9 +149,9 @@ def generate(env):
|
|||
if not path:
|
||||
path = []
|
||||
if SCons.Util.is_String(path):
|
||||
path = string.split(path, os.pathsep)
|
||||
path = str.split(path, os.pathsep)
|
||||
|
||||
env['ENV']['PATH'] = string.join([dir] + path, os.pathsep)
|
||||
env['ENV']['PATH'] = str.join(os.pathsep, [dir] + path)
|
||||
|
||||
# Most of mingw is the same as gcc and friends...
|
||||
gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas']
|
||||
|
|
|
@ -123,11 +123,11 @@ def GetOptionOrEnv(name, defval = None):
|
|||
Get option set on scons command line or in os.environ
|
||||
"""
|
||||
import os
|
||||
#if optenv and optenv.has_key(name):
|
||||
#if optenv and name in optenv:
|
||||
# return optenv[name]
|
||||
if ARGUMENTS.has_key(name):
|
||||
if name in ARGUMENTS:
|
||||
return ARGUMENTS[name]
|
||||
if os.environ.has_key(name):
|
||||
if name in os.environ:
|
||||
return os.environ[name]
|
||||
return defval
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue