summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/msvs.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-04-10 16:42:42 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-04-10 16:42:42 +0200
commit2b4e62c8dacc53317d63d987c4a8826a38bbf9aa (patch)
tree2ec174254744787d91ee83de5c49c8ab9309937e /engine/SCons/Tool/msvs.py
parent5ee29f69a1062eaa564b19dff870c13f9f8445df (diff)
parent70639bffe44444b5faee83772cc3c73dc2e46fed (diff)
Merge tag 'upstream/2.5.0'
Upstream version 2.5.0
Diffstat (limited to 'engine/SCons/Tool/msvs.py')
-rw-r--r--engine/SCons/Tool/msvs.py48
1 files changed, 5 insertions, 43 deletions
diff --git a/engine/SCons/Tool/msvs.py b/engine/SCons/Tool/msvs.py
index d47a939..df80edf 100644
--- a/engine/SCons/Tool/msvs.py
+++ b/engine/SCons/Tool/msvs.py
@@ -9,7 +9,7 @@ selection method.
"""
#
-# Copyright (c) 2001 - 2015 The SCons Foundation
+# Copyright (c) 2001 - 2016 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -30,7 +30,7 @@ selection method.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/msvs.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/msvs.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog"
import SCons.compat
@@ -100,42 +100,6 @@ def msvs_parse_version(s):
num, suite = version_re.match(s).groups()
return float(num), suite
-# os.path.relpath has been introduced in Python 2.6
-# We define it locally for earlier versions of Python
-def relpath(path, start=os.path.curdir):
- """Return a relative version of a path"""
- import sys
- if not path:
- raise ValueError("no path specified")
- start_list = os.path.abspath(start).split(os.sep)
- path_list = os.path.abspath(path).split(os.sep)
- if 'posix' in sys.builtin_module_names:
- # Work out how much of the filepath is shared by start and path.
- i = len(os.path.commonprefix([start_list, path_list]))
- else:
- if start_list[0].lower() != path_list[0].lower():
- unc_path, rest = os.path.splitunc(path)
- unc_start, rest = os.path.splitunc(start)
- if bool(unc_path) ^ bool(unc_start):
- raise ValueError("Cannot mix UNC and non-UNC paths (%s and %s)"
- % (path, start))
- else:
- raise ValueError("path is on drive %s, start on drive %s"
- % (path_list[0], start_list[0]))
- # Work out how much of the filepath is shared by start and path.
- for i in range(min(len(start_list), len(path_list))):
- if start_list[i].lower() != path_list[i].lower():
- break
- else:
- i += 1
- rel_list = [os.pardir] * (len(start_list)-i) + path_list[i:]
- if not rel_list:
- return os.path.curdir
- return os.path.join(*rel_list)
-
-if not "relpath" in os.path.__all__:
- os.path.relpath = relpath
-
# This is how we re-invoke SCons from inside MSVS Project files.
# The problem is that we might have been invoked as either scons.bat
# or scons.py. If we were invoked directly as scons.py, then we could
@@ -204,7 +168,7 @@ class _UserGenerator(object):
Base class for .dsp.user file generator
'''
# Default instance values.
- # Ok ... a bit defensive, but it does not seems reasonable to crash the
+ # Ok ... a bit defensive, but it does not seem reasonable to crash the
# build for a workspace user file. :-)
usrhead = None
usrdebg = None
@@ -212,7 +176,7 @@ class _UserGenerator(object):
createfile = False
def __init__(self, dspfile, source, env):
# DebugSettings should be a list of debug dictionary sorted in the same order
- # than the target list and variants
+ # as the target list and variants
if 'variant' not in env:
raise SCons.Errors.InternalError("You must specify a 'variant' argument (i.e. 'Debug' or " +\
"'Release') to create an MSVSProject.")
@@ -543,9 +507,7 @@ class _DSPGenerator(object):
self.sources[t[0]].append(self.env[t[1]])
for n in sourcenames:
- #TODO 2.4: compat layer supports sorted(key=) but not sort(key=)
- #TODO 2.4: self.sources[n].sort(key=lambda a: a.lower())
- self.sources[n] = sorted(self.sources[n], key=lambda a: a.lower())
+ self.sources[n].sort(key=lambda a: a.lower())
def AddConfig(self, variant, buildtarget, outdir, runfile, cmdargs, dspfile=dspfile):
config = Config()