diff --git a/fonts/unifont-8.0.01.ttf b/fonts/unifont-8.0.01.ttf deleted file mode 100644 index ec875c5a9..000000000 Binary files a/fonts/unifont-8.0.01.ttf and /dev/null differ diff --git a/scons/scons-LICENSE b/scons/scons-LICENSE index bd5632d16..060ceaf25 100644 --- a/scons/scons-LICENSE +++ b/scons/scons-LICENSE @@ -3,7 +3,7 @@ This copyright and license do not apply to any other software with which this software may have been included. -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 diff --git a/scons/scons-README b/scons/scons-README index 40a1a194d..7717b9bd2 100644 --- a/scons/scons-README +++ b/scons/scons-README @@ -1,4 +1,4 @@ -# Copyright (c) 2001 - 2015 The SCons Foundation +# Copyright (c) 2001 - 2016 The SCons Foundation SCons - a software construction tool diff --git a/scons/scons-local-2.4.1/SCons/compat/_scons_collections.py b/scons/scons-local-2.4.1/SCons/compat/_scons_collections.py deleted file mode 100644 index 4a0d96b9e..000000000 --- a/scons/scons-local-2.4.1/SCons/compat/_scons_collections.py +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (c) 2001 - 2015 The SCons Foundation -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -__doc__ = """ -collections compatibility module for older (pre-2.4) Python versions - -This does not not NOT (repeat, *NOT*) provide complete collections -functionality. It only wraps the portions of collections functionality -used by SCons, in an interface that looks enough like collections for -our purposes. -""" - -__revision__ = "src/engine/SCons/compat/_scons_collections.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" - -# Use exec to hide old names from fixers. -exec("""if True: - from UserDict import UserDict - from UserList import UserList - from UserString import UserString""") - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/scons/scons-local-2.4.1/SCons/compat/_scons_sets.py b/scons/scons-local-2.4.1/SCons/compat/_scons_sets.py deleted file mode 100644 index 0fde9941d..000000000 --- a/scons/scons-local-2.4.1/SCons/compat/_scons_sets.py +++ /dev/null @@ -1,563 +0,0 @@ -"""Classes to represent arbitrary sets (including sets of sets). - -This module implements sets using dictionaries whose values are -ignored. The usual operations (union, intersection, deletion, etc.) -are provided as both methods and operators. - -Important: sets are not sequences! While they support 'x in s', -'len(s)', and 'for x in s', none of those operations are unique for -sequences; for example, mappings support all three as well. The -characteristic operation for sequences is subscripting with small -integers: s[i], for i in range(len(s)). Sets don't support -subscripting at all. Also, sequences allow multiple occurrences and -their elements have a definite order; sets on the other hand don't -record multiple occurrences and don't remember the order of element -insertion (which is why they don't support s[i]). - -The following classes are provided: - -BaseSet -- All the operations common to both mutable and immutable - sets. This is an abstract class, not meant to be directly - instantiated. - -Set -- Mutable sets, subclass of BaseSet; not hashable. - -ImmutableSet -- Immutable sets, subclass of BaseSet; hashable. - An iterable argument is mandatory to create an ImmutableSet. - -_TemporarilyImmutableSet -- A wrapper around a Set, hashable, - giving the same hash value as the immutable set equivalent - would have. Do not use this class directly. - -Only hashable objects can be added to a Set. In particular, you cannot -really add a Set as an element to another Set; if you try, what is -actually added is an ImmutableSet built from it (it compares equal to -the one you tried adding). - -When you ask if `x in y' where x is a Set and y is a Set or -ImmutableSet, x is wrapped into a _TemporarilyImmutableSet z, and -what's tested is actually `z in y'. - -""" - -# Code history: -# -# - Greg V. Wilson wrote the first version, using a different approach -# to the mutable/immutable problem, and inheriting from dict. -# -# - Alex Martelli modified Greg's version to implement the current -# Set/ImmutableSet approach, and make the data an attribute. -# -# - Guido van Rossum rewrote much of the code, made some API changes, -# and cleaned up the docstrings. -# -# - Raymond Hettinger added a number of speedups and other -# improvements. - -# protect this import from the fixers... -exec('from itertools import ifilterfalse as filterfalse') - -__all__ = ['BaseSet', 'Set', 'ImmutableSet'] - -class BaseSet(object): - """Common base class for mutable and immutable sets.""" - - __slots__ = ['_data'] - - # Constructor - - def __init__(self): - """This is an abstract class.""" - # Don't call this from a concrete subclass! - if self.__class__ is BaseSet: - raise TypeError("BaseSet is an abstract class. " - "Use Set or ImmutableSet.") - - # Standard protocols: __len__, __repr__, __str__, __iter__ - - def __len__(self): - """Return the number of elements of a set.""" - return len(self._data) - - def __repr__(self): - """Return string representation of a set. - - This looks like 'Set([])'. - """ - return self._repr() - - # __str__ is the same as __repr__ - __str__ = __repr__ - - def _repr(self, sort_them=False): - elements = list(self._data.keys()) - if sort_them: - elements.sort() - return '%s(%r)' % (self.__class__.__name__, elements) - - def __iter__(self): - """Return an iterator over the elements or a set. - - This is the keys iterator for the underlying dict. - """ - # Wrapping name in () prevents fixer from "fixing" this - return (self._data.iterkeys)() - - # Three-way comparison is not supported. However, because __eq__ is - # tried before __cmp__, if Set x == Set y, x.__eq__(y) returns True and - # then cmp(x, y) returns 0 (Python doesn't actually call __cmp__ in this - # case). - - def __cmp__(self, other): - raise TypeError("can't compare sets using cmp()") - - # Equality comparisons using the underlying dicts. Mixed-type comparisons - # are allowed here, where Set == z for non-Set z always returns False, - # and Set != z always True. This allows expressions like "x in y" to - # give the expected result when y is a sequence of mixed types, not - # raising a pointless TypeError just because y contains a Set, or x is - # a Set and y contain's a non-set ("in" invokes only __eq__). - # Subtle: it would be nicer if __eq__ and __ne__ could return - # NotImplemented instead of True or False. Then the other comparand - # would get a chance to determine the result, and if the other comparand - # also returned NotImplemented then it would fall back to object address - # comparison (which would always return False for __eq__ and always - # True for __ne__). However, that doesn't work, because this type - # *also* implements __cmp__: if, e.g., __eq__ returns NotImplemented, - # Python tries __cmp__ next, and the __cmp__ here then raises TypeError. - - def __eq__(self, other): - if isinstance(other, BaseSet): - return self._data == other._data - else: - return False - - def __ne__(self, other): - if isinstance(other, BaseSet): - return self._data != other._data - else: - return True - - # Copying operations - - def copy(self): - """Return a shallow copy of a set.""" - result = self.__class__() - result._data.update(self._data) - return result - - __copy__ = copy # For the copy module - - def __deepcopy__(self, memo): - """Return a deep copy of a set; used by copy module.""" - # This pre-creates the result and inserts it in the memo - # early, in case the deep copy recurses into another reference - # to this same set. A set can't be an element of itself, but - # it can certainly contain an object that has a reference to - # itself. - from copy import deepcopy - result = self.__class__() - memo[id(self)] = result - data = result._data - value = True - for elt in self: - data[deepcopy(elt, memo)] = value - return result - - # Standard set operations: union, intersection, both differences. - # Each has an operator version (e.g. __or__, invoked with |) and a - # method version (e.g. union). - # Subtle: Each pair requires distinct code so that the outcome is - # correct when the type of other isn't suitable. For example, if - # we did "union = __or__" instead, then Set().union(3) would return - # NotImplemented instead of raising TypeError (albeit that *why* it - # raises TypeError as-is is also a bit subtle). - - def __or__(self, other): - """Return the union of two sets as a new set. - - (I.e. all elements that are in either set.) - """ - if not isinstance(other, BaseSet): - return NotImplemented - return self.union(other) - - def union(self, other): - """Return the union of two sets as a new set. - - (I.e. all elements that are in either set.) - """ - result = self.__class__(self) - result._update(other) - return result - - def __and__(self, other): - """Return the intersection of two sets as a new set. - - (I.e. all elements that are in both sets.) - """ - if not isinstance(other, BaseSet): - return NotImplemented - return self.intersection(other) - - def intersection(self, other): - """Return the intersection of two sets as a new set. - - (I.e. all elements that are in both sets.) - """ - if not isinstance(other, BaseSet): - other = Set(other) - if len(self) <= len(other): - little, big = self, other - else: - little, big = other, self - common = iter(filter(big._data.has_key, little)) - return self.__class__(common) - - def __xor__(self, other): - """Return the symmetric difference of two sets as a new set. - - (I.e. all elements that are in exactly one of the sets.) - """ - if not isinstance(other, BaseSet): - return NotImplemented - return self.symmetric_difference(other) - - def symmetric_difference(self, other): - """Return the symmetric difference of two sets as a new set. - - (I.e. all elements that are in exactly one of the sets.) - """ - result = self.__class__() - data = result._data - value = True - selfdata = self._data - try: - otherdata = other._data - except AttributeError: - otherdata = Set(other)._data - for elt in filterfalse(otherdata.has_key, selfdata): - data[elt] = value - for elt in filterfalse(selfdata.has_key, otherdata): - data[elt] = value - return result - - def __sub__(self, other): - """Return the difference of two sets as a new Set. - - (I.e. all elements that are in this set and not in the other.) - """ - if not isinstance(other, BaseSet): - return NotImplemented - return self.difference(other) - - def difference(self, other): - """Return the difference of two sets as a new Set. - - (I.e. all elements that are in this set and not in the other.) - """ - result = self.__class__() - data = result._data - try: - otherdata = other._data - except AttributeError: - otherdata = Set(other)._data - value = True - for elt in filterfalse(otherdata.has_key, self): - data[elt] = value - return result - - # Membership test - - def __contains__(self, element): - """Report whether an element is a member of a set. - - (Called in response to the expression `element in self'.) - """ - try: - return element in self._data - except TypeError: - transform = getattr(element, "__as_temporarily_immutable__", None) - if transform is None: - raise # re-raise the TypeError exception we caught - return transform() in self._data - - # Subset and superset test - - def issubset(self, other): - """Report whether another set contains this set.""" - self._binary_sanity_check(other) - if len(self) > len(other): # Fast check for obvious cases - return False - for elt in filterfalse(other._data.has_key, self): - return False - return True - - def issuperset(self, other): - """Report whether this set contains another set.""" - self._binary_sanity_check(other) - if len(self) < len(other): # Fast check for obvious cases - return False - for elt in filterfalse(self._data.has_key, other): - return False - return True - - # Inequality comparisons using the is-subset relation. - __le__ = issubset - __ge__ = issuperset - - def __lt__(self, other): - self._binary_sanity_check(other) - return len(self) < len(other) and self.issubset(other) - - def __gt__(self, other): - self._binary_sanity_check(other) - return len(self) > len(other) and self.issuperset(other) - - # Assorted helpers - - def _binary_sanity_check(self, other): - # Check that the other argument to a binary operation is also - # a set, raising a TypeError otherwise. - if not isinstance(other, BaseSet): - raise TypeError("Binary operation only permitted between sets") - - def _compute_hash(self): - # Calculate hash code for a set by xor'ing the hash codes of - # the elements. This ensures that the hash code does not depend - # on the order in which elements are added to the set. This is - # not called __hash__ because a BaseSet should not be hashable; - # only an ImmutableSet is hashable. - result = 0 - for elt in self: - result ^= hash(elt) - return result - - def _update(self, iterable): - # The main loop for update() and the subclass __init__() methods. - data = self._data - - # Use the fast update() method when a dictionary is available. - if isinstance(iterable, BaseSet): - data.update(iterable._data) - return - - value = True - - if type(iterable) in (list, tuple, xrange): - # Optimized: we know that __iter__() and next() can't - # raise TypeError, so we can move 'try:' out of the loop. - it = iter(iterable) - while True: - try: - for element in it: - data[element] = value - return - except TypeError: - transform = getattr(element, "__as_immutable__", None) - if transform is None: - raise # re-raise the TypeError exception we caught - data[transform()] = value - else: - # Safe: only catch TypeError where intended - for element in iterable: - try: - data[element] = value - except TypeError: - transform = getattr(element, "__as_immutable__", None) - if transform is None: - raise # re-raise the TypeError exception we caught - data[transform()] = value - - -class ImmutableSet(BaseSet): - """Immutable set class.""" - - __slots__ = ['_hashcode'] - - # BaseSet + hashing - - def __init__(self, iterable=None): - """Construct an immutable set from an optional iterable.""" - self._hashcode = None - self._data = {} - if iterable is not None: - self._update(iterable) - - def __hash__(self): - if self._hashcode is None: - self._hashcode = self._compute_hash() - return self._hashcode - - def __getstate__(self): - return self._data, self._hashcode - - def __setstate__(self, state): - self._data, self._hashcode = state - -class Set(BaseSet): - """ Mutable set class.""" - - __slots__ = [] - - # BaseSet + operations requiring mutability; no hashing - - def __init__(self, iterable=None): - """Construct a set from an optional iterable.""" - self._data = {} - if iterable is not None: - self._update(iterable) - - def __getstate__(self): - # getstate's results are ignored if it is not - return self._data, - - def __setstate__(self, data): - self._data, = data - - def __hash__(self): - """A Set cannot be hashed.""" - # We inherit object.__hash__, so we must deny this explicitly - raise TypeError("Can't hash a Set, only an ImmutableSet.") - - # In-place union, intersection, differences. - # Subtle: The xyz_update() functions deliberately return None, - # as do all mutating operations on built-in container types. - # The __xyz__ spellings have to return self, though. - - def __ior__(self, other): - """Update a set with the union of itself and another.""" - self._binary_sanity_check(other) - self._data.update(other._data) - return self - - def union_update(self, other): - """Update a set with the union of itself and another.""" - self._update(other) - - def __iand__(self, other): - """Update a set with the intersection of itself and another.""" - self._binary_sanity_check(other) - self._data = (self & other)._data - return self - - def intersection_update(self, other): - """Update a set with the intersection of itself and another.""" - if isinstance(other, BaseSet): - self &= other - else: - self._data = (self.intersection(other))._data - - def __ixor__(self, other): - """Update a set with the symmetric difference of itself and another.""" - self._binary_sanity_check(other) - self.symmetric_difference_update(other) - return self - - def symmetric_difference_update(self, other): - """Update a set with the symmetric difference of itself and another.""" - data = self._data - value = True - if not isinstance(other, BaseSet): - other = Set(other) - if self is other: - self.clear() - for elt in other: - if elt in data: - del data[elt] - else: - data[elt] = value - - def __isub__(self, other): - """Remove all elements of another set from this set.""" - self._binary_sanity_check(other) - self.difference_update(other) - return self - - def difference_update(self, other): - """Remove all elements of another set from this set.""" - data = self._data - if not isinstance(other, BaseSet): - other = Set(other) - if self is other: - self.clear() - for elt in filter(data.has_key, other): - del data[elt] - - # Python dict-like mass mutations: update, clear - - def update(self, iterable): - """Add all values from an iterable (such as a list or file).""" - self._update(iterable) - - def clear(self): - """Remove all elements from this set.""" - self._data.clear() - - # Single-element mutations: add, remove, discard - - def add(self, element): - """Add an element to a set. - - This has no effect if the element is already present. - """ - try: - self._data[element] = True - except TypeError: - transform = getattr(element, "__as_immutable__", None) - if transform is None: - raise # re-raise the TypeError exception we caught - self._data[transform()] = True - - def remove(self, element): - """Remove an element from a set; it must be a member. - - If the element is not a member, raise a KeyError. - """ - try: - del self._data[element] - except TypeError: - transform = getattr(element, "__as_temporarily_immutable__", None) - if transform is None: - raise # re-raise the TypeError exception we caught - del self._data[transform()] - - def discard(self, element): - """Remove an element from a set if it is a member. - - If the element is not a member, do nothing. - """ - try: - self.remove(element) - except KeyError: - pass - - def pop(self): - """Remove and return an arbitrary set element.""" - return self._data.popitem()[0] - - def __as_immutable__(self): - # Return a copy of self as an immutable set - return ImmutableSet(self) - - def __as_temporarily_immutable__(self): - # Return self wrapped in a temporarily immutable set - return _TemporarilyImmutableSet(self) - - -class _TemporarilyImmutableSet(BaseSet): - # Wrap a mutable set as if it was temporarily immutable. - # This only supplies hashing and equality comparisons. - - def __init__(self, set): - self._set = set - self._data = set._data # Needed by ImmutableSet.__eq__() - - def __hash__(self): - return self._set._compute_hash() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/scons/scons-local-2.4.1/SCons/compat/_scons_subprocess.py b/scons/scons-local-2.4.1/SCons/compat/_scons_subprocess.py deleted file mode 100644 index eebe53d34..000000000 --- a/scons/scons-local-2.4.1/SCons/compat/_scons_subprocess.py +++ /dev/null @@ -1,1281 +0,0 @@ -# subprocess - Subprocesses with accessible I/O streams -# -# For more information about this module, see PEP 324. -# -# This module should remain compatible with Python 2.2, see PEP 291. -# -# Copyright (c) 2003-2005 by Peter Astrand -# -# Licensed to PSF under a Contributor Agreement. -# See http://www.python.org/2.4/license for licensing details. - -r"""subprocess - Subprocesses with accessible I/O streams - -This module allows you to spawn processes, connect to their -input/output/error pipes, and obtain their return codes. This module -intends to replace several other, older modules and functions, like: - -os.system -os.spawn* -os.popen* -popen2.* -commands.* - -Information about how the subprocess module can be used to replace these -modules and functions can be found below. - - - -Using the subprocess module -=========================== -This module defines one class called Popen: - -class Popen(args, bufsize=0, executable=None, - stdin=None, stdout=None, stderr=None, - preexec_fn=None, close_fds=False, shell=False, - cwd=None, env=None, universal_newlines=False, - startupinfo=None, creationflags=0): - - -Arguments are: - -args should be a string, or a sequence of program arguments. The -program to execute is normally the first item in the args sequence or -string, but can be explicitly set by using the executable argument. - -On UNIX, with shell=False (default): In this case, the Popen class -uses os.execvp() to execute the child program. args should normally -be a sequence. A string will be treated as a sequence with the string -as the only item (the program to execute). - -On UNIX, with shell=True: If args is a string, it specifies the -command string to execute through the shell. If args is a sequence, -the first item specifies the command string, and any additional items -will be treated as additional shell arguments. - -On Windows: the Popen class uses CreateProcess() to execute the child -program, which operates on strings. If args is a sequence, it will be -converted to a string using the list2cmdline method. Please note that -not all MS Windows applications interpret the command line the same -way: The list2cmdline is designed for applications using the same -rules as the MS C runtime. - -bufsize, if given, has the same meaning as the corresponding argument -to the built-in open() function: 0 means unbuffered, 1 means line -buffered, any other positive value means use a buffer of -(approximately) that size. A negative bufsize means to use the system -default, which usually means fully buffered. The default value for -bufsize is 0 (unbuffered). - -stdin, stdout and stderr specify the executed programs' standard -input, standard output and standard error file handles, respectively. -Valid values are PIPE, an existing file descriptor (a positive -integer), an existing file object, and None. PIPE indicates that a -new pipe to the child should be created. With None, no redirection -will occur; the child's file handles will be inherited from the -parent. Additionally, stderr can be STDOUT, which indicates that the -stderr data from the applications should be captured into the same -file handle as for stdout. - -If preexec_fn is set to a callable object, this object will be called -in the child process just before the child is executed. - -If close_fds is true, all file descriptors except 0, 1 and 2 will be -closed before the child process is executed. - -if shell is true, the specified command will be executed through the -shell. - -If cwd is not None, the current directory will be changed to cwd -before the child is executed. - -If env is not None, it defines the environment variables for the new -process. - -If universal_newlines is true, the file objects stdout and stderr are -opened as a text files, but lines may be terminated by any of '\n', -the Unix end-of-line convention, '\r', the Macintosh convention or -'\r\n', the Windows convention. All of these external representations -are seen as '\n' by the Python program. Note: This feature is only -available if Python is built with universal newline support (the -default). Also, the newlines attribute of the file objects stdout, -stdin and stderr are not updated by the communicate() method. - -The startupinfo and creationflags, if given, will be passed to the -underlying CreateProcess() function. They can specify things such as -appearance of the main window and priority for the new process. -(Windows only) - - -This module also defines two shortcut functions: - -call(*popenargs, **kwargs): - Run command with arguments. Wait for command to complete, then - return the returncode attribute. - - The arguments are the same as for the Popen constructor. Example: - - retcode = call(["ls", "-l"]) - -check_call(*popenargs, **kwargs): - Run command with arguments. Wait for command to complete. If the - exit code was zero then return, otherwise raise - CalledProcessError. The CalledProcessError object will have the - return code in the returncode attribute. - - The arguments are the same as for the Popen constructor. Example: - - check_call(["ls", "-l"]) - -Exceptions ----------- -Exceptions raised in the child process, before the new program has -started to execute, will be re-raised in the parent. Additionally, -the exception object will have one extra attribute called -'child_traceback', which is a string containing traceback information -from the childs point of view. - -The most common exception raised is OSError. This occurs, for -example, when trying to execute a non-existent file. Applications -should prepare for OSErrors. - -A ValueError will be raised if Popen is called with invalid arguments. - -check_call() will raise CalledProcessError, if the called process -returns a non-zero return code. - - -Security --------- -Unlike some other popen functions, this implementation will never call -/bin/sh implicitly. This means that all characters, including shell -metacharacters, can safely be passed to child processes. - - -Popen objects -============= -Instances of the Popen class have the following methods: - -poll() - Check if child process has terminated. Returns returncode - attribute. - -wait() - Wait for child process to terminate. Returns returncode attribute. - -communicate(input=None) - Interact with process: Send data to stdin. Read data from stdout - and stderr, until end-of-file is reached. Wait for process to - terminate. The optional stdin argument should be a string to be - sent to the child process, or None, if no data should be sent to - the child. - - communicate() returns a tuple (stdout, stderr). - - Note: The data read is buffered in memory, so do not use this - method if the data size is large or unlimited. - -The following attributes are also available: - -stdin - If the stdin argument is PIPE, this attribute is a file object - that provides input to the child process. Otherwise, it is None. - -stdout - If the stdout argument is PIPE, this attribute is a file object - that provides output from the child process. Otherwise, it is - None. - -stderr - If the stderr argument is PIPE, this attribute is file object that - provides error output from the child process. Otherwise, it is - None. - -pid - The process ID of the child process. - -returncode - The child return code. A None value indicates that the process - hasn't terminated yet. A negative value -N indicates that the - child was terminated by signal N (UNIX only). - - -Replacing older functions with the subprocess module -==================================================== -In this section, "a ==> b" means that b can be used as a replacement -for a. - -Note: All functions in this section fail (more or less) silently if -the executed program cannot be found; this module raises an OSError -exception. - -In the following examples, we assume that the subprocess module is -imported with "from subprocess import *". - - -Replacing /bin/sh shell backquote ---------------------------------- -output=`mycmd myarg` -==> -output = Popen(["mycmd", "myarg"], stdout=PIPE).communicate()[0] - - -Replacing shell pipe line -------------------------- -output=`dmesg | grep hda` -==> -p1 = Popen(["dmesg"], stdout=PIPE) -p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE) -output = p2.communicate()[0] - - -Replacing os.system() ---------------------- -sts = os.system("mycmd" + " myarg") -==> -p = Popen("mycmd" + " myarg", shell=True) -pid, sts = os.waitpid(p.pid, 0) - -Note: - -* Calling the program through the shell is usually not required. - -* It's easier to look at the returncode attribute than the - exitstatus. - -A more real-world example would look like this: - -try: - retcode = call("mycmd" + " myarg", shell=True) - if retcode < 0: - print >>sys.stderr, "Child was terminated by signal", -retcode - else: - print >>sys.stderr, "Child returned", retcode -except OSError, e: - print >>sys.stderr, "Execution failed:", e - - -Replacing os.spawn* -------------------- -P_NOWAIT example: - -pid = os.spawnlp(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg") -==> -pid = Popen(["/bin/mycmd", "myarg"]).pid - - -P_WAIT example: - -retcode = os.spawnlp(os.P_WAIT, "/bin/mycmd", "mycmd", "myarg") -==> -retcode = call(["/bin/mycmd", "myarg"]) - - -Vector example: - -os.spawnvp(os.P_NOWAIT, path, args) -==> -Popen([path] + args[1:]) - - -Environment example: - -os.spawnlpe(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg", env) -==> -Popen(["/bin/mycmd", "myarg"], env={"PATH": "/usr/bin"}) - - -Replacing os.popen* -------------------- -pipe = os.popen(cmd, mode='r', bufsize) -==> -pipe = Popen(cmd, shell=True, bufsize=bufsize, stdout=PIPE).stdout - -pipe = os.popen(cmd, mode='w', bufsize) -==> -pipe = Popen(cmd, shell=True, bufsize=bufsize, stdin=PIPE).stdin - - -(child_stdin, child_stdout) = os.popen2(cmd, mode, bufsize) -==> -p = Popen(cmd, shell=True, bufsize=bufsize, - stdin=PIPE, stdout=PIPE, close_fds=True) -(child_stdin, child_stdout) = (p.stdin, p.stdout) - - -(child_stdin, - child_stdout, - child_stderr) = os.popen3(cmd, mode, bufsize) -==> -p = Popen(cmd, shell=True, bufsize=bufsize, - stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True) -(child_stdin, - child_stdout, - child_stderr) = (p.stdin, p.stdout, p.stderr) - - -(child_stdin, child_stdout_and_stderr) = os.popen4(cmd, mode, bufsize) -==> -p = Popen(cmd, shell=True, bufsize=bufsize, - stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True) -(child_stdin, child_stdout_and_stderr) = (p.stdin, p.stdout) - - -Replacing popen2.* ------------------- -Note: If the cmd argument to popen2 functions is a string, the command -is executed through /bin/sh. If it is a list, the command is directly -executed. - -(child_stdout, child_stdin) = popen2.popen2("somestring", bufsize, mode) -==> -p = Popen(["somestring"], shell=True, bufsize=bufsize - stdin=PIPE, stdout=PIPE, close_fds=True) -(child_stdout, child_stdin) = (p.stdout, p.stdin) - - -(child_stdout, child_stdin) = popen2.popen2(["mycmd", "myarg"], bufsize, mode) -==> -p = Popen(["mycmd", "myarg"], bufsize=bufsize, - stdin=PIPE, stdout=PIPE, close_fds=True) -(child_stdout, child_stdin) = (p.stdout, p.stdin) - -The popen2.Popen3 and popen3.Popen4 basically works as subprocess.Popen, -except that: - -* subprocess.Popen raises an exception if the execution fails -* the capturestderr argument is replaced with the stderr argument. -* stdin=PIPE and stdout=PIPE must be specified. -* popen2 closes all filedescriptors by default, but you have to specify - close_fds=True with subprocess.Popen. - - -""" - -import sys -mswindows = (sys.platform == "win32") - -import os -import types -import traceback - -# Exception classes used by this module. -class CalledProcessError(Exception): - """This exception is raised when a process run by check_call() returns - a non-zero exit status. The exit status will be stored in the - returncode attribute.""" - def __init__(self, returncode, cmd): - self.returncode = returncode - self.cmd = cmd - def __str__(self): - return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) - - -if mswindows: - try: - import threading - except ImportError: - # SCons: the threading module is only used by the communicate() - # method, which we don't actually use, so don't worry if we - # can't import it. - pass - import msvcrt - try: - # Try to get _subprocess - from _subprocess import * - class STARTUPINFO(object): - dwFlags = 0 - hStdInput = None - hStdOutput = None - hStdError = None - wShowWindow = 0 - class pywintypes(object): - error = IOError - except ImportError: - # If not there, then drop back to requiring pywin32 - # TODO: Should this be wrapped in try as well? To notify user to install - # pywin32 ? With URL to it? - import pywintypes - from win32api import GetStdHandle, STD_INPUT_HANDLE, \ - STD_OUTPUT_HANDLE, STD_ERROR_HANDLE - from win32api import GetCurrentProcess, DuplicateHandle, \ - GetModuleFileName, GetVersion - from win32con import DUPLICATE_SAME_ACCESS, SW_HIDE - from win32pipe import CreatePipe - from win32process import CreateProcess, STARTUPINFO, \ - GetExitCodeProcess, STARTF_USESTDHANDLES, \ - STARTF_USESHOWWINDOW, CREATE_NEW_CONSOLE - from win32event import WaitForSingleObject, INFINITE, WAIT_OBJECT_0 - - -else: - import select - import errno - import fcntl - import pickle - - try: - fcntl.F_GETFD - except AttributeError: - fcntl.F_GETFD = 1 - - try: - fcntl.F_SETFD - except AttributeError: - fcntl.F_SETFD = 2 - -__all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call", "CalledProcessError"] - -try: - MAXFD = os.sysconf("SC_OPEN_MAX") -except KeyboardInterrupt: - raise # SCons: don't swallow keyboard interrupts -except: - MAXFD = 256 - -try: - isinstance(1, int) -except TypeError: - def is_int(obj): - return isinstance(obj, type(1)) - def is_int_or_long(obj): - return type(obj) in (type(1), type(1L)) -else: - def is_int(obj): - return isinstance(obj, int) - def is_int_or_long(obj): - return isinstance(obj, (int, long)) - -try: - types.StringTypes -except AttributeError: - try: - types.StringTypes = (str, unicode) - except NameError: - types.StringTypes = (str,) -def is_string(obj): - return isinstance(obj, types.StringTypes) - -_active = [] - -def _cleanup(): - for inst in _active[:]: - if inst.poll(_deadstate=sys.maxsize) >= 0: - try: - _active.remove(inst) - except ValueError: - # This can happen if two threads create a new Popen instance. - # It's harmless that it was already removed, so ignore. - pass - -PIPE = -1 -STDOUT = -2 - - -def call(*popenargs, **kwargs): - """Run command with arguments. Wait for command to complete, then - return the returncode attribute. - - The arguments are the same as for the Popen constructor. Example: - - retcode = call(["ls", "-l"]) - """ - return apply(Popen, popenargs, kwargs).wait() - - -def check_call(*popenargs, **kwargs): - """Run command with arguments. Wait for command to complete. If - the exit code was zero then return, otherwise raise - CalledProcessError. The CalledProcessError object will have the - return code in the returncode attribute. - - The arguments are the same as for the Popen constructor. Example: - - check_call(["ls", "-l"]) - """ - retcode = call(*popenargs, **kwargs) - cmd = kwargs.get("args") - if cmd is None: - cmd = popenargs[0] - if retcode: - raise CalledProcessError(retcode, cmd) - return retcode - - -def list2cmdline(seq): - """ - Translate a sequence of arguments into a command line - string, using the same rules as the MS C runtime: - - 1) Arguments are delimited by white space, which is either a - space or a tab. - - 2) A string surrounded by double quotation marks is - interpreted as a single argument, regardless of white space - contained within. A quoted string can be embedded in an - argument. - - 3) A double quotation mark preceded by a backslash is - interpreted as a literal double quotation mark. - - 4) Backslashes are interpreted literally, unless they - immediately precede a double quotation mark. - - 5) If backslashes immediately precede a double quotation mark, - every pair of backslashes is interpreted as a literal - backslash. If the number of backslashes is odd, the last - backslash escapes the next double quotation mark as - described in rule 3. - """ - - # See - # http://msdn.microsoft.com/library/en-us/vccelng/htm/progs_12.asp - result = [] - needquote = False - for arg in seq: - bs_buf = [] - - # Add a space to separate this argument from the others - if result: - result.append(' ') - - needquote = (" " in arg) or ("\t" in arg) - if needquote: - result.append('"') - - for c in arg: - if c == '\\': - # Don't know if we need to double yet. - bs_buf.append(c) - elif c == '"': - # Double backspaces. - result.append('\\' * len(bs_buf)*2) - bs_buf = [] - result.append('\\"') - else: - # Normal char - if bs_buf: - result.extend(bs_buf) - bs_buf = [] - result.append(c) - - # Add remaining backspaces, if any. - if bs_buf: - result.extend(bs_buf) - - if needquote: - result.extend(bs_buf) - result.append('"') - - return ''.join(result) - -class Popen(object): - def __init__(self, args, bufsize=0, executable=None, - stdin=None, stdout=None, stderr=None, - preexec_fn=None, close_fds=False, shell=False, - cwd=None, env=None, universal_newlines=False, - startupinfo=None, creationflags=0): - """Create new Popen instance.""" - _cleanup() - - self._child_created = False - if not is_int_or_long(bufsize): - raise TypeError("bufsize must be an integer") - - if mswindows: - if preexec_fn is not None: - raise ValueError("preexec_fn is not supported on Windows " - "platforms") - if close_fds: - raise ValueError("close_fds is not supported on Windows " - "platforms") - else: - # POSIX - if startupinfo is not None: - raise ValueError("startupinfo is only supported on Windows " - "platforms") - if creationflags != 0: - raise ValueError("creationflags is only supported on Windows " - "platforms") - - self.stdin = None - self.stdout = None - self.stderr = None - self.pid = None - self.returncode = None - self.universal_newlines = universal_newlines - - # Input and output objects. The general principle is like - # this: - # - # Parent Child - # ------ ----- - # p2cwrite ---stdin---> p2cread - # c2pread <--stdout--- c2pwrite - # errread <--stderr--- errwrite - # - # On POSIX, the child objects are file descriptors. On - # Windows, these are Windows file handles. The parent objects - # are file descriptors on both platforms. The parent objects - # are None when not using PIPEs. The child objects are None - # when not redirecting. - - (p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite) = self._get_handles(stdin, stdout, stderr) - - self._execute_child(args, executable, preexec_fn, close_fds, - cwd, env, universal_newlines, - startupinfo, creationflags, shell, - p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite) - - if p2cwrite: - self.stdin = os.fdopen(p2cwrite, 'wb', bufsize) - if c2pread: - if universal_newlines: - self.stdout = os.fdopen(c2pread, 'rU', bufsize) - else: - self.stdout = os.fdopen(c2pread, 'rb', bufsize) - if errread: - if universal_newlines: - self.stderr = os.fdopen(errread, 'rU', bufsize) - else: - self.stderr = os.fdopen(errread, 'rb', bufsize) - - - def _translate_newlines(self, data): - data = data.replace("\r\n", "\n") - data = data.replace("\r", "\n") - return data - - - def __del__(self): - if not self._child_created: - # We didn't get to successfully create a child process. - return - # In case the child hasn't been waited on, check if it's done. - self.poll(_deadstate=sys.maxsize) - if self.returncode is None and _active is not None: - # Child is still running, keep us alive until we can wait on it. - _active.append(self) - - - def communicate(self, input=None): - """Interact with process: Send data to stdin. Read data from - stdout and stderr, until end-of-file is reached. Wait for - process to terminate. The optional input argument should be a - string to be sent to the child process, or None, if no data - should be sent to the child. - - communicate() returns a tuple (stdout, stderr).""" - - # Optimization: If we are only using one pipe, or no pipe at - # all, using select() or threads is unnecessary. - if [self.stdin, self.stdout, self.stderr].count(None) >= 2: - stdout = None - stderr = None - if self.stdin: - if input: - self.stdin.write(input) - self.stdin.close() - elif self.stdout: - stdout = self.stdout.read() - elif self.stderr: - stderr = self.stderr.read() - self.wait() - return (stdout, stderr) - - return self._communicate(input) - - - if mswindows: - # - # Windows methods - # - def _get_handles(self, stdin, stdout, stderr): - """Construct and return tupel with IO objects: - p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite - """ - if stdin is None and stdout is None and stderr is None: - return (None, None, None, None, None, None) - - p2cread, p2cwrite = None, None - c2pread, c2pwrite = None, None - errread, errwrite = None, None - - if stdin is None: - p2cread = GetStdHandle(STD_INPUT_HANDLE) - elif stdin == PIPE: - p2cread, p2cwrite = CreatePipe(None, 0) - # Detach and turn into fd - p2cwrite = p2cwrite.Detach() - p2cwrite = msvcrt.open_osfhandle(p2cwrite, 0) - elif is_int(stdin): - p2cread = msvcrt.get_osfhandle(stdin) - else: - # Assuming file-like object - p2cread = msvcrt.get_osfhandle(stdin.fileno()) - p2cread = self._make_inheritable(p2cread) - - if stdout is None: - c2pwrite = GetStdHandle(STD_OUTPUT_HANDLE) - elif stdout == PIPE: - c2pread, c2pwrite = CreatePipe(None, 0) - # Detach and turn into fd - c2pread = c2pread.Detach() - c2pread = msvcrt.open_osfhandle(c2pread, 0) - elif is_int(stdout): - c2pwrite = msvcrt.get_osfhandle(stdout) - else: - # Assuming file-like object - c2pwrite = msvcrt.get_osfhandle(stdout.fileno()) - c2pwrite = self._make_inheritable(c2pwrite) - - if stderr is None: - errwrite = GetStdHandle(STD_ERROR_HANDLE) - elif stderr == PIPE: - errread, errwrite = CreatePipe(None, 0) - # Detach and turn into fd - errread = errread.Detach() - errread = msvcrt.open_osfhandle(errread, 0) - elif stderr == STDOUT: - errwrite = c2pwrite - elif is_int(stderr): - errwrite = msvcrt.get_osfhandle(stderr) - else: - # Assuming file-like object - errwrite = msvcrt.get_osfhandle(stderr.fileno()) - errwrite = self._make_inheritable(errwrite) - - return (p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite) - - - def _make_inheritable(self, handle): - """Return a duplicate of handle, which is inheritable""" - return DuplicateHandle(GetCurrentProcess(), handle, - GetCurrentProcess(), 0, 1, - DUPLICATE_SAME_ACCESS) - - - def _find_w9xpopen(self): - """Find and return absolut path to w9xpopen.exe""" - w9xpopen = os.path.join(os.path.dirname(GetModuleFileName(0)), - "w9xpopen.exe") - if not os.path.exists(w9xpopen): - # Eeek - file-not-found - possibly an embedding - # situation - see if we can locate it in sys.exec_prefix - w9xpopen = os.path.join(os.path.dirname(sys.exec_prefix), - "w9xpopen.exe") - if not os.path.exists(w9xpopen): - raise RuntimeError("Cannot locate w9xpopen.exe, which is " - "needed for Popen to work with your " - "shell or platform.") - return w9xpopen - - - def _execute_child(self, args, executable, preexec_fn, close_fds, - cwd, env, universal_newlines, - startupinfo, creationflags, shell, - p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite): - """Execute program (MS Windows version)""" - - if not isinstance(args, types.StringTypes): - args = list2cmdline(args) - - # Process startup details - if startupinfo is None: - startupinfo = STARTUPINFO() - if None not in (p2cread, c2pwrite, errwrite): - startupinfo.dwFlags = startupinfo.dwFlags | STARTF_USESTDHANDLES - startupinfo.hStdInput = p2cread - startupinfo.hStdOutput = c2pwrite - startupinfo.hStdError = errwrite - - if shell: - startupinfo.dwFlags = startupinfo.dwFlags | STARTF_USESHOWWINDOW - startupinfo.wShowWindow = SW_HIDE - comspec = os.environ.get("COMSPEC", "cmd.exe") - args = comspec + " /c " + args - if (GetVersion() >= 0x80000000L or - os.path.basename(comspec).lower() == "command.com"): - # Win9x, or using command.com on NT. We need to - # use the w9xpopen intermediate program. For more - # information, see KB Q150956 - # (http://web.archive.org/web/20011105084002/http://support.microsoft.com/support/kb/articles/Q150/9/56.asp) - w9xpopen = self._find_w9xpopen() - args = '"%s" %s' % (w9xpopen, args) - # Not passing CREATE_NEW_CONSOLE has been known to - # cause random failures on win9x. Specifically a - # dialog: "Your program accessed mem currently in - # use at xxx" and a hopeful warning about the - # stability of your system. Cost is Ctrl+C wont - # kill children. - creationflags = creationflags | CREATE_NEW_CONSOLE - - # Start the process - try: - hp, ht, pid, tid = CreateProcess(executable, args, - # no special security - None, None, - # must inherit handles to pass std - # handles - 1, - creationflags, - env, - cwd, - startupinfo) - except pywintypes.error, e: - # Translate pywintypes.error to WindowsError, which is - # a subclass of OSError. FIXME: We should really - # translate errno using _sys_errlist (or simliar), but - # how can this be done from Python? - raise WindowsError(*e.args) - - # Retain the process handle, but close the thread handle - self._child_created = True - self._handle = hp - self.pid = pid - ht.Close() - - # Child is launched. Close the parent's copy of those pipe - # handles that only the child should have open. You need - # to make sure that no handles to the write end of the - # output pipe are maintained in this process or else the - # pipe will not close when the child process exits and the - # ReadFile will hang. - if p2cread is not None: - p2cread.Close() - if c2pwrite is not None: - c2pwrite.Close() - if errwrite is not None: - errwrite.Close() - - - def poll(self, _deadstate=None): - """Check if child process has terminated. Returns returncode - attribute.""" - if self.returncode is None: - if WaitForSingleObject(self._handle, 0) == WAIT_OBJECT_0: - self.returncode = GetExitCodeProcess(self._handle) - return self.returncode - - - def wait(self): - """Wait for child process to terminate. Returns returncode - attribute.""" - if self.returncode is None: - obj = WaitForSingleObject(self._handle, INFINITE) - self.returncode = GetExitCodeProcess(self._handle) - return self.returncode - - - def _readerthread(self, fh, buffer): - buffer.append(fh.read()) - - - def _communicate(self, input): - stdout = None # Return - stderr = None # Return - - if self.stdout: - stdout = [] - stdout_thread = threading.Thread(target=self._readerthread, - args=(self.stdout, stdout)) - stdout_thread.setDaemon(True) - stdout_thread.start() - if self.stderr: - stderr = [] - stderr_thread = threading.Thread(target=self._readerthread, - args=(self.stderr, stderr)) - stderr_thread.setDaemon(True) - stderr_thread.start() - - if self.stdin: - if input is not None: - self.stdin.write(input) - self.stdin.close() - - if self.stdout: - stdout_thread.join() - if self.stderr: - stderr_thread.join() - - # All data exchanged. Translate lists into strings. - if stdout is not None: - stdout = stdout[0] - if stderr is not None: - stderr = stderr[0] - - # Translate newlines, if requested. We cannot let the file - # object do the translation: It is based on stdio, which is - # impossible to combine with select (unless forcing no - # buffering). - if self.universal_newlines and hasattr(file, 'newlines'): - if stdout: - stdout = self._translate_newlines(stdout) - if stderr: - stderr = self._translate_newlines(stderr) - - self.wait() - return (stdout, stderr) - - else: - # - # POSIX methods - # - def _get_handles(self, stdin, stdout, stderr): - """Construct and return tupel with IO objects: - p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite - """ - p2cread, p2cwrite = None, None - c2pread, c2pwrite = None, None - errread, errwrite = None, None - - if stdin is None: - pass - elif stdin == PIPE: - p2cread, p2cwrite = os.pipe() - elif is_int(stdin): - p2cread = stdin - else: - # Assuming file-like object - p2cread = stdin.fileno() - - if stdout is None: - pass - elif stdout == PIPE: - c2pread, c2pwrite = os.pipe() - elif is_int(stdout): - c2pwrite = stdout - else: - # Assuming file-like object - c2pwrite = stdout.fileno() - - if stderr is None: - pass - elif stderr == PIPE: - errread, errwrite = os.pipe() - elif stderr == STDOUT: - errwrite = c2pwrite - elif is_int(stderr): - errwrite = stderr - else: - # Assuming file-like object - errwrite = stderr.fileno() - - return (p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite) - - - def _set_cloexec_flag(self, fd): - try: - cloexec_flag = fcntl.FD_CLOEXEC - except AttributeError: - cloexec_flag = 1 - - old = fcntl.fcntl(fd, fcntl.F_GETFD) - fcntl.fcntl(fd, fcntl.F_SETFD, old | cloexec_flag) - - - def _close_fds(self, but): - for i in range(3, MAXFD): - if i == but: - continue - try: - os.close(i) - except KeyboardInterrupt: - raise # SCons: don't swallow keyboard interrupts - except: - pass - - - def _execute_child(self, args, executable, preexec_fn, close_fds, - cwd, env, universal_newlines, - startupinfo, creationflags, shell, - p2cread, p2cwrite, - c2pread, c2pwrite, - errread, errwrite): - """Execute program (POSIX version)""" - - if is_string(args): - args = [args] - - if shell: - args = ["/bin/sh", "-c"] + args - - if executable is None: - executable = args[0] - - # For transferring possible exec failure from child to parent - # The first char specifies the exception type: 0 means - # OSError, 1 means some other error. - errpipe_read, errpipe_write = os.pipe() - self._set_cloexec_flag(errpipe_write) - - self.pid = os.fork() - self._child_created = True - if self.pid == 0: - # Child - try: - # Close parent's pipe ends - if p2cwrite: - os.close(p2cwrite) - if c2pread: - os.close(c2pread) - if errread: - os.close(errread) - os.close(errpipe_read) - - # Dup fds for child - if p2cread: - os.dup2(p2cread, 0) - if c2pwrite: - os.dup2(c2pwrite, 1) - if errwrite: - os.dup2(errwrite, 2) - - # Close pipe fds. Make sure we don't close the same - # fd more than once, or standard fds. - try: - set - except NameError: - # Fall-back for earlier Python versions, so epydoc - # can use this module directly to execute things. - if p2cread: - os.close(p2cread) - if c2pwrite and c2pwrite not in (p2cread,): - os.close(c2pwrite) - if errwrite and errwrite not in (p2cread, c2pwrite): - os.close(errwrite) - else: - for fd in set((p2cread, c2pwrite, errwrite))-set((0,1,2)): - if fd: os.close(fd) - - # Close all other fds, if asked for - if close_fds: - self._close_fds(but=errpipe_write) - - if cwd is not None: - os.chdir(cwd) - - if preexec_fn: - apply(preexec_fn) - - if env is None: - os.execvp(executable, args) - else: - os.execvpe(executable, args, env) - - except KeyboardInterrupt: - raise # SCons: don't swallow keyboard interrupts - - except: - exc_type, exc_value, tb = sys.exc_info() - # Save the traceback and attach it to the exception object - exc_lines = traceback.format_exception(exc_type, - exc_value, - tb) - exc_value.child_traceback = ''.join(exc_lines) - os.write(errpipe_write, pickle.dumps(exc_value)) - - # This exitcode won't be reported to applications, so it - # really doesn't matter what we return. - os._exit(255) - - # Parent - os.close(errpipe_write) - if p2cread and p2cwrite: - os.close(p2cread) - if c2pwrite and c2pread: - os.close(c2pwrite) - if errwrite and errread: - os.close(errwrite) - - # Wait for exec to fail or succeed; possibly raising exception - data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB - os.close(errpipe_read) - if data != "": - os.waitpid(self.pid, 0) - child_exception = pickle.loads(data) - raise child_exception - - - def _handle_exitstatus(self, sts): - if os.WIFSIGNALED(sts): - self.returncode = -os.WTERMSIG(sts) - elif os.WIFEXITED(sts): - self.returncode = os.WEXITSTATUS(sts) - else: - # Should never happen - raise RuntimeError("Unknown child exit status!") - - - def poll(self, _deadstate=None): - """Check if child process has terminated. Returns returncode - attribute.""" - if self.returncode is None: - try: - pid, sts = os.waitpid(self.pid, os.WNOHANG) - if pid == self.pid: - self._handle_exitstatus(sts) - except os.error: - if _deadstate is not None: - self.returncode = _deadstate - return self.returncode - - - def wait(self): - """Wait for child process to terminate. Returns returncode - attribute.""" - if self.returncode is None: - pid, sts = os.waitpid(self.pid, 0) - self._handle_exitstatus(sts) - return self.returncode - - - def _communicate(self, input): - read_set = [] - write_set = [] - stdout = None # Return - stderr = None # Return - - if self.stdin: - # Flush stdio buffer. This might block, if the user has - # been writing to .stdin in an uncontrolled fashion. - self.stdin.flush() - if input: - write_set.append(self.stdin) - else: - self.stdin.close() - if self.stdout: - read_set.append(self.stdout) - stdout = [] - if self.stderr: - read_set.append(self.stderr) - stderr = [] - - input_offset = 0 - while read_set or write_set: - rlist, wlist, xlist = select.select(read_set, write_set, []) - - if self.stdin in wlist: - # When select has indicated that the file is writable, - # we can write up to PIPE_BUF bytes without risk - # blocking. POSIX defines PIPE_BUF >= 512 - m = memoryview(input)[input_offset:input_offset+512] - bytes_written = os.write(self.stdin.fileno(), m) - input_offset = input_offset + bytes_written - if input_offset >= len(input): - self.stdin.close() - write_set.remove(self.stdin) - - if self.stdout in rlist: - data = os.read(self.stdout.fileno(), 1024) - if data == "": - self.stdout.close() - read_set.remove(self.stdout) - stdout.append(data) - - if self.stderr in rlist: - data = os.read(self.stderr.fileno(), 1024) - if data == "": - self.stderr.close() - read_set.remove(self.stderr) - stderr.append(data) - - # All data exchanged. Translate lists into strings. - if stdout is not None: - stdout = ''.join(stdout) - if stderr is not None: - stderr = ''.join(stderr) - - # Translate newlines, if requested. We cannot let the file - # object do the translation: It is based on stdio, which is - # impossible to combine with select (unless forcing no - # buffering). - if self.universal_newlines and hasattr(file, 'newlines'): - if stdout: - stdout = self._translate_newlines(stdout) - if stderr: - stderr = self._translate_newlines(stderr) - - self.wait() - return (stdout, stderr) - - -def _demo_posix(): - # - # Example 1: Simple redirection: Get process list - # - plist = Popen(["ps"], stdout=PIPE).communicate()[0] - print "Process list:" - print plist - - # - # Example 2: Change uid before executing child - # - if os.getuid() == 0: - p = Popen(["id"], preexec_fn=lambda: os.setuid(100)) - p.wait() - - # - # Example 3: Connecting several subprocesses - # - print "Looking for 'hda'..." - p1 = Popen(["dmesg"], stdout=PIPE) - p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE) - print repr(p2.communicate()[0]) - - # - # Example 4: Catch execution error - # - print - print "Trying a weird file..." - try: - print Popen(["/this/path/does/not/exist"]).communicate() - except OSError, e: - if e.errno == errno.ENOENT: - print "The file didn't exist. I thought so..." - print "Child traceback:" - print e.child_traceback - else: - print "Error", e.errno - else: - sys.stderr.write( "Gosh. No error.\n" ) - - -def _demo_windows(): - # - # Example 1: Connecting several subprocesses - # - print "Looking for 'PROMPT' in set output..." - p1 = Popen("set", stdout=PIPE, shell=True) - p2 = Popen('find "PROMPT"', stdin=p1.stdout, stdout=PIPE) - print repr(p2.communicate()[0]) - - # - # Example 2: Simple execution of program - # - print "Executing calc..." - p = Popen("calc") - p.wait() - - -if __name__ == "__main__": - if mswindows: - _demo_windows() - else: - _demo_posix() - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/scons/scons-local-2.4.1/SCons/Action.py b/scons/scons-local-2.5.0/SCons/Action.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Action.py rename to scons/scons-local-2.5.0/SCons/Action.py index 7a4203c89..6c34a4331 100644 --- a/scons/scons-local-2.4.1/SCons/Action.py +++ b/scons/scons-local-2.5.0/SCons/Action.py @@ -76,7 +76,7 @@ way for wrapping up the functions. """ -# 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 @@ -97,7 +97,7 @@ way for wrapping up the functions. # 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/Action.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Action.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import dis import os @@ -235,11 +235,7 @@ def _code_contents(code): # The code contents depends on the number of local variables # but not their actual names. contents.append("%s,%s" % (code.co_argcount, len(code.co_varnames))) - try: - contents.append(",%s,%s" % (len(code.co_cellvars), len(code.co_freevars))) - except AttributeError: - # Older versions of Python do not support closures. - contents.append(",0,0") + contents.append(",%s,%s" % (len(code.co_cellvars), len(code.co_freevars))) # The code contents depends on any constants accessed by the # function. Note that we have to call _object_contents on each @@ -276,11 +272,7 @@ def _function_contents(func): contents.append(',()') # The function contents depends on the closure captured cell values. - try: - closure = func.func_closure or [] - except AttributeError: - # Older versions of Python do not support closures. - closure = [] + closure = func.func_closure or [] #xxx = [_object_contents(x.cell_contents) for x in closure] try: @@ -946,7 +938,6 @@ class LazyAction(CommandGeneratorAction, CommandAction): def __init__(self, var, kw): if SCons.Debug.track_instances: logInstanceCreation(self, 'Action.LazyAction') - #FUTURE CommandAction.__init__(self, '${'+var+'}', **kw) CommandAction.__init__(self, '${'+var+'}', **kw) self.var = SCons.Util.to_String(var) self.gen_kw = kw diff --git a/scons/scons-local-2.4.1/SCons/Builder.py b/scons/scons-local-2.5.0/SCons/Builder.py similarity index 99% rename from scons/scons-local-2.4.1/SCons/Builder.py rename to scons/scons-local-2.5.0/SCons/Builder.py index 6bdd0082c..060b1a865 100644 --- a/scons/scons-local-2.4.1/SCons/Builder.py +++ b/scons/scons-local-2.5.0/SCons/Builder.py @@ -76,7 +76,7 @@ There are the following methods for internal use within this module: """ # -# 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 @@ -97,7 +97,7 @@ There are the following methods for internal use within this module: # 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/Builder.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Builder.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import collections @@ -299,7 +299,7 @@ def _node_errors(builder, env, tlist, slist): msg = "Two different environments were specified for target %s,\n\tbut they appear to have the same action: %s" % (t, action.genstring(tlist, slist, t.env)) SCons.Warnings.warn(SCons.Warnings.DuplicateEnvironmentWarning, msg) else: - msg = "Two environments with different actions were specified for the same target: %s" % t + msg = "Two environments with different actions were specified for the same target: %s\n(action 1: %s)\n(action 2: %s)" % (t,t_contents,contents) raise UserError(msg) if builder.multi: if t.builder != builder: diff --git a/scons/scons-local-2.4.1/SCons/CacheDir.py b/scons/scons-local-2.5.0/SCons/CacheDir.py similarity index 70% rename from scons/scons-local-2.4.1/SCons/CacheDir.py rename to scons/scons-local-2.5.0/SCons/CacheDir.py index 086d44d3c..05199d931 100644 --- a/scons/scons-local-2.4.1/SCons/CacheDir.py +++ b/scons/scons-local-2.5.0/SCons/CacheDir.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,17 +21,19 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/CacheDir.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/CacheDir.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """ CacheDir support """ -import os.path +import json +import os import stat import sys import SCons.Action +import SCons.Warnings cache_enabled = True cache_debug = False @@ -71,7 +73,8 @@ CacheRetrieve = SCons.Action.Action(CacheRetrieveFunc, CacheRetrieveString) CacheRetrieveSilent = SCons.Action.Action(CacheRetrieveFunc, None) def CachePushFunc(target, source, env): - if cache_readonly: return + if cache_readonly: + return t = target[0] if t.nocache: @@ -124,6 +127,10 @@ def CachePushFunc(target, source, env): CachePush = SCons.Action.Action(CachePushFunc, None) +# Nasty hack to cut down to one warning for each cachedir path that needs +# upgrading. +warned = dict() + class CacheDir(object): def __init__(self, path): @@ -132,11 +139,63 @@ class CacheDir(object): except ImportError: msg = "No hashlib or MD5 module available, CacheDir() not supported" SCons.Warnings.warn(SCons.Warnings.NoMD5ModuleWarning, msg) - self.path = None - else: - self.path = path + path = None + self.path = path self.current_cache_debug = None self.debugFP = None + self.config = dict() + if path is None: + return + # See if there's a config file in the cache directory. If there is, + # use it. If there isn't, and the directory exists and isn't empty, + # produce a warning. If the directory doesn't exist or is empty, + # write a config file. + config_file = os.path.join(path, 'config') + if not os.path.exists(config_file): + # A note: There is a race hazard here, if two processes start and + # attempt to create the cache directory at the same time. However, + # python doesn't really give you the option to do exclusive file + # creation (it doesn't even give you the option to error on opening + # an existing file for writing...). The ordering of events here + # as an attempt to alleviate this, on the basis that it's a pretty + # unlikely occurence (it'd require two builds with a brand new cache + # directory) + if os.path.isdir(path) and len(os.listdir(path)) != 0: + self.config['prefix_len'] = 1 + # When building the project I was testing this on, the warning + # was output over 20 times. That seems excessive + global warned + if self.path not in warned: + msg = "Please upgrade your cache by running " +\ + " scons-configure-cache.py " + self.path + SCons.Warnings.warn(SCons.Warnings.CacheVersionWarning, msg) + warned[self.path] = True + else: + if not os.path.isdir(path): + try: + os.makedirs(path) + except OSError: + # If someone else is trying to create the directory at + # the same time as me, bad things will happen + msg = "Failed to create cache directory " + path + raise SCons.Errors.EnvironmentError(msg) + + self.config['prefix_len'] = 2 + if not os.path.exists(config_file): + try: + with open(config_file, 'w') as config: + json.dump(self.config, config) + except: + msg = "Failed to write cache configuration for " + path + raise SCons.Errors.EnvironmentError(msg) + else: + try: + with open(config_file) as config: + self.config = json.load(config) + except ValueError: + msg = "Failed to read cache configuration for " + path + raise SCons.Errors.EnvironmentError(msg) + def CacheDebug(self, fmt, target, cachefile): if cache_debug != self.current_cache_debug: @@ -151,7 +210,7 @@ class CacheDir(object): self.debugFP.write(fmt % (target, os.path.split(cachefile)[1])) def is_enabled(self): - return (cache_enabled and not self.path is None) + return cache_enabled and not self.path is None def is_readonly(self): return cache_readonly @@ -163,7 +222,7 @@ class CacheDir(object): return None, None sig = node.get_cachedir_bsig() - subdir = sig[0].upper() + subdir = sig[:self.config['prefix_len']].upper() dir = os.path.join(self.path, subdir) return dir, os.path.join(dir, sig) diff --git a/scons/scons-local-2.4.1/SCons/Conftest.py b/scons/scons-local-2.5.0/SCons/Conftest.py similarity index 100% rename from scons/scons-local-2.4.1/SCons/Conftest.py rename to scons/scons-local-2.5.0/SCons/Conftest.py diff --git a/scons/scons-local-2.4.1/SCons/Debug.py b/scons/scons-local-2.5.0/SCons/Debug.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Debug.py rename to scons/scons-local-2.5.0/SCons/Debug.py index 22d09ab6b..2ba97cd3a 100644 --- a/scons/scons-local-2.4.1/SCons/Debug.py +++ b/scons/scons-local-2.5.0/SCons/Debug.py @@ -1,12 +1,15 @@ """SCons.Debug Code for debugging SCons internal things. Shouldn't be -needed by most users. +needed by most users. Quick shortcuts: + +from SCons.Debug import caller_trace +caller_trace() """ # -# 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 @@ -28,7 +31,7 @@ needed by most users. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Debug.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Debug.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import sys @@ -137,8 +140,12 @@ def caller_stack(): caller_bases = {} caller_dicts = {} -# trace a caller's stack def caller_trace(back=0): + """ + Trace caller stack and save info into global dicts, which + are printed automatically at the end of SCons execution. + """ + global caller_bases, caller_dicts import traceback tb = traceback.extract_stack(limit=3+back) tb.reverse() diff --git a/scons/scons-local-2.4.1/SCons/Defaults.py b/scons/scons-local-2.5.0/SCons/Defaults.py similarity index 88% rename from scons/scons-local-2.4.1/SCons/Defaults.py rename to scons/scons-local-2.5.0/SCons/Defaults.py index 8c86c955b..91f8f2c74 100644 --- a/scons/scons-local-2.4.1/SCons/Defaults.py +++ b/scons/scons-local-2.5.0/SCons/Defaults.py @@ -10,7 +10,7 @@ from distutils.msvccompiler. """ # -# 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 @@ -33,7 +33,7 @@ from distutils.msvccompiler. # from __future__ import division -__revision__ = "src/engine/SCons/Defaults.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Defaults.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os @@ -169,15 +169,73 @@ def get_paths_str(dest): else: return '"' + str(dest) + '"' +permission_dic = { + 'u':{ + 'r':stat.S_IRUSR, + 'w':stat.S_IWUSR, + 'x':stat.S_IXUSR + }, + 'g':{ + 'r':stat.S_IRGRP, + 'w':stat.S_IWGRP, + 'x':stat.S_IXGRP + }, + 'o':{ + 'r':stat.S_IROTH, + 'w':stat.S_IWOTH, + 'x':stat.S_IXOTH + } +} + def chmod_func(dest, mode): + import SCons.Util + from string import digits SCons.Node.FS.invalidate_node_memos(dest) if not SCons.Util.is_List(dest): dest = [dest] - for element in dest: - os.chmod(str(element), mode) + if SCons.Util.is_String(mode) and not 0 in [i in digits for i in mode]: + mode = int(mode, 8) + if not SCons.Util.is_String(mode): + for element in dest: + os.chmod(str(element), mode) + else: + mode = str(mode) + for operation in mode.split(","): + if "=" in operation: + operator = "=" + elif "+" in operation: + operator = "+" + elif "-" in operation: + operator = "-" + else: + raise SyntaxError("Could not find +, - or =") + operation_list = operation.split(operator) + if len(operation_list) is not 2: + raise SyntaxError("More than one operator found") + user = operation_list[0].strip().replace("a", "ugo") + permission = operation_list[1].strip() + new_perm = 0 + for u in user: + for p in permission: + try: + new_perm = new_perm | permission_dic[u][p] + except KeyError: + raise SyntaxError("Unrecognized user or permission format") + for element in dest: + curr_perm = os.stat(str(element)).st_mode + if operator == "=": + os.chmod(str(element), new_perm) + elif operator == "+": + os.chmod(str(element), curr_perm | new_perm) + elif operator == "-": + os.chmod(str(element), curr_perm & ~new_perm) def chmod_strfunc(dest, mode): - return 'Chmod(%s, 0%o)' % (get_paths_str(dest), mode) + import SCons.Util + if not SCons.Util.is_String(mode): + return 'Chmod(%s, 0%o)' % (get_paths_str(dest), mode) + else: + return 'Chmod(%s, "%s")' % (get_paths_str(dest), str(mode)) Chmod = ActionFactory(chmod_func, chmod_strfunc) @@ -493,7 +551,7 @@ def __libversionflags(env, version_var, flags_var): ConstructionEnvironment = { 'BUILDERS' : {}, - 'SCANNERS' : [], + 'SCANNERS' : [ SCons.Tool.SourceFileScanner ], 'CONFIGUREDIR' : '#/.sconf_temp', 'CONFIGURELOG' : '#/config.log', 'CPPSUFFIXES' : SCons.Tool.CSuffixes, diff --git a/scons/scons-local-2.4.1/SCons/Environment.py b/scons/scons-local-2.5.0/SCons/Environment.py similarity index 99% rename from scons/scons-local-2.4.1/SCons/Environment.py rename to scons/scons-local-2.5.0/SCons/Environment.py index b779302bd..71361add4 100644 --- a/scons/scons-local-2.4.1/SCons/Environment.py +++ b/scons/scons-local-2.5.0/SCons/Environment.py @@ -10,7 +10,7 @@ Environment """ # -# 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 @@ -31,7 +31,7 @@ Environment # 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/Environment.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Environment.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import copy @@ -857,25 +857,6 @@ class SubstitutionEnvironment(object): self[key] = t return self -# def MergeShellPaths(self, args, prepend=1): -# """ -# Merge the dict in args into the shell environment in env['ENV']. -# Shell path elements are appended or prepended according to prepend. - -# Uses Pre/AppendENVPath, so it always appends or prepends uniquely. - -# Example: env.MergeShellPaths({'LIBPATH': '/usr/local/lib'}) -# prepends /usr/local/lib to env['ENV']['LIBPATH']. -# """ - -# for pathname, pathval in args.items(): -# if not pathval: -# continue -# if prepend: -# self.PrependENVPath(pathname, pathval) -# else: -# self.AppendENVPath(pathname, pathval) - def default_decide_source(dependency, target, prev_ni): f = SCons.Defaults.DefaultEnvironment().decide_source diff --git a/scons/scons-local-2.4.1/SCons/Errors.py b/scons/scons-local-2.5.0/SCons/Errors.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Errors.py rename to scons/scons-local-2.5.0/SCons/Errors.py index d19d8e46e..0ddd7b35c 100644 --- a/scons/scons-local-2.4.1/SCons/Errors.py +++ b/scons/scons-local-2.5.0/SCons/Errors.py @@ -1,5 +1,5 @@ # -# 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 @@ -28,7 +28,7 @@ and user errors in SCons. """ -__revision__ = "src/engine/SCons/Errors.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Errors.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Executor.py b/scons/scons-local-2.5.0/SCons/Executor.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Executor.py rename to scons/scons-local-2.5.0/SCons/Executor.py index f7a4ee15e..8161502cc 100644 --- a/scons/scons-local-2.4.1/SCons/Executor.py +++ b/scons/scons-local-2.5.0/SCons/Executor.py @@ -6,7 +6,7 @@ Nodes. """ # -# 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 @@ -27,7 +27,7 @@ Nodes. # 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/Executor.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Executor.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import collections @@ -122,7 +122,6 @@ def execute_action_list(obj, target, kw): kw = obj.get_kw(kw) status = 0 for act in obj.get_action_list(): - #args = (self.get_all_targets(), self.get_all_sources(), env) args = ([], [], env) status = act(*args, **kw) if isinstance(status, SCons.Errors.BuildError): @@ -218,7 +217,9 @@ class Executor(object): us = [] ut = [] for b in self.batches: - if b.targets[0].is_up_to_date(): + # don't add targets marked always build to unchanged lists + # add to changed list as they always need to build + if not b.targets[0].always_build and b.targets[0].is_up_to_date(): us.extend(list(map(rfile, b.sources))) ut.extend(b.targets) else: @@ -244,14 +245,12 @@ class Executor(object): return self._changed_targets_list def _get_source(self, *args, **kw): - #return SCons.Util.NodeList([rfile(self.batches[0].sources[0]).get_subst_proxy()]) return rfile(self.batches[0].sources[0]).get_subst_proxy() def _get_sources(self, *args, **kw): return SCons.Util.NodeList([rfile(n).get_subst_proxy() for n in self.get_all_sources()]) def _get_target(self, *args, **kw): - #return SCons.Util.NodeList([self.batches[0].targets[0].get_subst_proxy()]) return self.batches[0].targets[0].get_subst_proxy() def _get_targets(self, *args, **kw): @@ -486,29 +485,15 @@ class Executor(object): each individual target, which is a hell of a lot more efficient. """ env = self.get_build_env() + path = self.get_build_scanner_path + kw = self.get_kw() # TODO(batch): scan by batches) deps = [] - if scanner: - for node in node_list: - node.disambiguate() - s = scanner.select(node) - if not s: - continue - path = self.get_build_scanner_path(s) - deps.extend(node.get_implicit_deps(env, s, path)) - else: - kw = self.get_kw() - for node in node_list: - node.disambiguate() - scanner = node.get_env_scanner(env, kw) - if not scanner: - continue - scanner = scanner.select(node) - if not scanner: - continue - path = self.get_build_scanner_path(scanner) - deps.extend(node.get_implicit_deps(env, scanner, path)) + + for node in node_list: + node.disambiguate() + deps.extend(node.get_implicit_deps(env, scanner, path, kw)) deps.extend(self.get_implicit_deps()) diff --git a/scons/scons-local-2.4.1/SCons/Job.py b/scons/scons-local-2.5.0/SCons/Job.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Job.py rename to scons/scons-local-2.5.0/SCons/Job.py index 08c6c30f5..19cf3be9d 100644 --- a/scons/scons-local-2.4.1/SCons/Job.py +++ b/scons/scons-local-2.5.0/SCons/Job.py @@ -7,7 +7,7 @@ stop, and wait on jobs. """ # -# 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 @@ -29,7 +29,7 @@ stop, and wait on jobs. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Job.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Job.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.compat @@ -70,7 +70,7 @@ class Jobs(object): def __init__(self, num, taskmaster): """ - create 'num' jobs using the given taskmaster. + Create 'num' jobs using the given taskmaster. If 'num' is 1 or less, then a serial job will be used, otherwise a parallel job with 'num' worker threads will @@ -126,10 +126,10 @@ class Jobs(object): c) SIGHUP: Controlling shell exiting We handle all of these cases by stopping the taskmaster. It - turns out that it very difficult to stop the build process + turns out that it's very difficult to stop the build process by throwing asynchronously an exception such as KeyboardInterrupt. For example, the python Condition - variables (threading.Condition) and queue's do not seem to + variables (threading.Condition) and queues do not seem to be asynchronous-exception-safe. It would require adding a whole bunch of try/finally block and except KeyboardInterrupt all over the place. @@ -177,7 +177,7 @@ class Serial(object): The taskmaster's next_task() method should return the next task that needs to be executed, or None if there are no more tasks. The taskmaster's executed() method will be called for each task when it - is successfully executed or failed() will be called if it failed to + is successfully executed, or failed() will be called if it failed to execute (e.g. execute() raised an exception).""" self.taskmaster = taskmaster @@ -351,7 +351,7 @@ else: The taskmaster's next_task() method should return the next task that needs to be executed, or None if there are no more tasks. The taskmaster's executed() method will be called - for each task when it is successfully executed or failed() + for each task when it is successfully executed, or failed() will be called if the task failed to execute (i.e. execute() raised an exception). diff --git a/scons/scons-local-2.4.1/SCons/Memoize.py b/scons/scons-local-2.5.0/SCons/Memoize.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Memoize.py rename to scons/scons-local-2.5.0/SCons/Memoize.py index 8051c6bc3..495e13c05 100644 --- a/scons/scons-local-2.4.1/SCons/Memoize.py +++ b/scons/scons-local-2.5.0/SCons/Memoize.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Memoize.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Memoize.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Memoizer diff --git a/scons/scons-local-2.4.1/SCons/Node/Alias.py b/scons/scons-local-2.5.0/SCons/Node/Alias.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Node/Alias.py rename to scons/scons-local-2.5.0/SCons/Node/Alias.py index 3b58d4d88..d6adbf8e9 100644 --- a/scons/scons-local-2.4.1/SCons/Node/Alias.py +++ b/scons/scons-local-2.5.0/SCons/Node/Alias.py @@ -8,7 +8,7 @@ This creates a hash of global Aliases (dummy targets). """ # -# 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 @@ This creates a hash of global Aliases (dummy targets). # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Node/Alias.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Node/Alias.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import collections diff --git a/scons/scons-local-2.4.1/SCons/Node/FS.py b/scons/scons-local-2.5.0/SCons/Node/FS.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Node/FS.py rename to scons/scons-local-2.5.0/SCons/Node/FS.py index bd43676b2..57085ecd1 100644 --- a/scons/scons-local-2.4.1/SCons/Node/FS.py +++ b/scons/scons-local-2.5.0/SCons/Node/FS.py @@ -11,7 +11,7 @@ that can be used by scripts or modules looking for the canonical default. """ # -# 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 @@ -32,7 +32,7 @@ that can be used by scripts or modules looking for the canonical default. # 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/Node/FS.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Node/FS.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import fnmatch import os @@ -186,7 +186,7 @@ needs_normpath_check = re.compile( # We need to renormalize the path if it contains a '.' # directory, but NOT if it is a single '.' '/' characters. We # do not want to match a single '.' because this case is checked - # for explicitely since this is common enough case. + # for explicitly since this is common enough case. # # Note that we check for all the following cases: # @@ -1165,15 +1165,6 @@ class LocalFS(object): return '' -#class RemoteFS: -# # Skeleton for the obvious methods we might need from the -# # abstraction layer for a remote filesystem. -# def upload(self, local_src, remote_dst): -# pass -# def download(self, remote_src, local_dst): -# pass - - class FS(LocalFS): def __init__(self, path = None): @@ -2234,7 +2225,6 @@ class Dir(Base): # the overall list will also be filtered later, # after we exit this loop. if pattern[0] != '.': - #disk_names = [ d for d in disk_names if d[0] != '.' ] disk_names = [x for x in disk_names if x[0] != '.'] disk_names = fnmatch.filter(disk_names, pattern) dirEntry = dir.Entry @@ -2627,13 +2617,6 @@ class File(Base): the directory of this file.""" return self.dir.File(name) - #def generate_build_dict(self): - # """Return an appropriate dictionary of values for building - # this File.""" - # return {'Dir' : self.Dir, - # 'File' : self.File, - # 'RDirs' : self.RDirs} - def _morph(self): """Turn a file system node into a File object.""" self.scanner_paths = {} @@ -2907,9 +2890,7 @@ class File(Base): pass if scanner: - # result = [n.disambiguate() for n in scanner(self, env, path)] - result = scanner(self, env, path) - result = [N.disambiguate() for N in result] + result = [n.disambiguate() for n in scanner(self, env, path)] else: result = [] @@ -3519,36 +3500,6 @@ class FileFinder(object): filedir, filename = os.path.split(filename) if filedir: - # More compact code that we can't use until we drop - # support for Python 1.5.2: - # - #def filedir_lookup(p, fd=filedir): - # """ - # A helper function that looks up a directory for a file - # we're trying to find. This only creates the Dir Node - # if it exists on-disk, since if the directory doesn't - # exist we know we won't find any files in it... :-) - # """ - # dir, name = os.path.split(fd) - # if dir: - # p = filedir_lookup(p, dir) - # if not p: - # return None - # norm_name = _my_normcase(name) - # try: - # node = p.entries[norm_name] - # except KeyError: - # return p.dir_on_disk(name) - # if isinstance(node, Dir): - # return node - # if isinstance(node, Entry): - # node.must_be_same(Dir) - # return node - # if isinstance(node, Dir) or isinstance(node, Entry): - # return node - # return None - #paths = [_f for _f in map(filedir_lookup, paths) if _f] - self.default_filedir = filedir paths = [_f for _f in map(self.filedir_lookup, paths) if _f] diff --git a/scons/scons-local-2.4.1/SCons/Node/Python.py b/scons/scons-local-2.5.0/SCons/Node/Python.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Node/Python.py rename to scons/scons-local-2.5.0/SCons/Node/Python.py index 171752807..f3f6c2316 100644 --- a/scons/scons-local-2.4.1/SCons/Node/Python.py +++ b/scons/scons-local-2.5.0/SCons/Node/Python.py @@ -5,7 +5,7 @@ Python nodes. """ # -# 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 @@ -27,7 +27,7 @@ Python nodes. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Node/Python.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Node/Python.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Node diff --git a/scons/scons-local-2.4.1/SCons/Node/__init__.py b/scons/scons-local-2.5.0/SCons/Node/__init__.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Node/__init__.py rename to scons/scons-local-2.5.0/SCons/Node/__init__.py index 4cd62d5d5..3ce481b1f 100644 --- a/scons/scons-local-2.4.1/SCons/Node/__init__.py +++ b/scons/scons-local-2.5.0/SCons/Node/__init__.py @@ -20,7 +20,7 @@ be able to depend on any other type of "thing." """ # -# 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 @@ -41,7 +41,7 @@ be able to depend on any other type of "thing." # 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/Node/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Node/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import collections import copy @@ -916,35 +916,56 @@ class Node(object): """ return [] - def get_implicit_deps(self, env, scanner, path): + def get_implicit_deps(self, env, initial_scanner, path_func, kw = {}): """Return a list of implicit dependencies for this node. This method exists to handle recursive invocation of the scanner on the implicit dependencies returned by the scanner, if the scanner's recursive flag says that we should. """ - if not scanner: - return [] - - # Give the scanner a chance to select a more specific scanner - # for this Node. - #scanner = scanner.select(self) - nodes = [self] seen = {} seen[self] = 1 - deps = [] + dependencies = [] + + root_node_scanner = self._get_scanner(env, initial_scanner, None, kw) + while nodes: - n = nodes.pop(0) - d = [x for x in n.get_found_includes(env, scanner, path) if x not in seen] - if d: - deps.extend(d) - for n in d: - seen[n] = 1 - nodes.extend(scanner.recurse_nodes(d)) + node = nodes.pop(0) - return deps + scanner = node._get_scanner(env, initial_scanner, root_node_scanner, kw) + + if not scanner: + continue + path = path_func(scanner) + + included_deps = [x for x in node.get_found_includes(env, scanner, path) if x not in seen] + if included_deps: + dependencies.extend(included_deps) + for dep in included_deps: + seen[dep] = 1 + nodes.extend(scanner.recurse_nodes(included_deps)) + + return dependencies + + def _get_scanner(self, env, initial_scanner, root_node_scanner, kw): + if not initial_scanner: + # handle implicit scanner case + scanner = self.get_env_scanner(env, kw) + if scanner: + scanner = scanner.select(self) + else: + # handle explicit scanner case + scanner = initial_scanner.select(self) + + if not scanner: + # no scanner could be found for the given node's scanner key; + # thus, make an attempt at using a default. + scanner = root_node_scanner + + return scanner + def get_env_scanner(self, env, kw={}): return env.get_scanner(self.scanner_key()) @@ -1260,11 +1281,6 @@ class Node(object): def _add_child(self, collection, set, child): """Adds 'child' to 'collection', first checking 'set' to see if it's already present.""" - #if type(child) is not type([]): - # child = [child] - #for c in child: - # if not isinstance(c, Node): - # raise TypeError, c added = None for c in child: if c not in set: diff --git a/scons/scons-local-2.4.1/SCons/Options/BoolOption.py b/scons/scons-local-2.5.0/SCons/Options/BoolOption.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Options/BoolOption.py rename to scons/scons-local-2.5.0/SCons/Options/BoolOption.py index 62aa952a2..3c583868e 100644 --- a/scons/scons-local-2.4.1/SCons/Options/BoolOption.py +++ b/scons/scons-local-2.5.0/SCons/Options/BoolOption.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/BoolOption.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Options/BoolOption.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.4.1/SCons/Options/EnumOption.py b/scons/scons-local-2.5.0/SCons/Options/EnumOption.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Options/EnumOption.py rename to scons/scons-local-2.5.0/SCons/Options/EnumOption.py index 3e689afb0..913aef68f 100644 --- a/scons/scons-local-2.4.1/SCons/Options/EnumOption.py +++ b/scons/scons-local-2.5.0/SCons/Options/EnumOption.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/EnumOption.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Options/EnumOption.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.4.1/SCons/Options/ListOption.py b/scons/scons-local-2.5.0/SCons/Options/ListOption.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Options/ListOption.py rename to scons/scons-local-2.5.0/SCons/Options/ListOption.py index c9a7f8f39..820358d3a 100644 --- a/scons/scons-local-2.4.1/SCons/Options/ListOption.py +++ b/scons/scons-local-2.5.0/SCons/Options/ListOption.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/ListOption.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Options/ListOption.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.4.1/SCons/Options/PackageOption.py b/scons/scons-local-2.5.0/SCons/Options/PackageOption.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Options/PackageOption.py rename to scons/scons-local-2.5.0/SCons/Options/PackageOption.py index 5a12cbe76..4d27f9cdf 100644 --- a/scons/scons-local-2.4.1/SCons/Options/PackageOption.py +++ b/scons/scons-local-2.5.0/SCons/Options/PackageOption.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/PackageOption.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Options/PackageOption.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.4.1/SCons/Options/PathOption.py b/scons/scons-local-2.5.0/SCons/Options/PathOption.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Options/PathOption.py rename to scons/scons-local-2.5.0/SCons/Options/PathOption.py index 00070b142..db7f921f2 100644 --- a/scons/scons-local-2.4.1/SCons/Options/PathOption.py +++ b/scons/scons-local-2.5.0/SCons/Options/PathOption.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/PathOption.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Options/PathOption.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.4.1/SCons/Options/__init__.py b/scons/scons-local-2.5.0/SCons/Options/__init__.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Options/__init__.py rename to scons/scons-local-2.5.0/SCons/Options/__init__.py index 5612ad047..6ba4d20ff 100644 --- a/scons/scons-local-2.4.1/SCons/Options/__init__.py +++ b/scons/scons-local-2.5.0/SCons/Options/__init__.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Options/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.4.1/SCons/PathList.py b/scons/scons-local-2.5.0/SCons/PathList.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/PathList.py rename to scons/scons-local-2.5.0/SCons/PathList.py index 61b64ffaf..a0d9e744e 100644 --- a/scons/scons-local-2.4.1/SCons/PathList.py +++ b/scons/scons-local-2.5.0/SCons/PathList.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,13 +21,13 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/PathList.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/PathList.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """SCons.PathList A module for handling lists of directory paths (the sort of things that get set as CPPPATH, LIBPATH, etc.) with as much caching of data and -efficiency as we can while still keeping the evaluation delayed so that we +efficiency as we can, while still keeping the evaluation delayed so that we Do the Right Thing (almost) regardless of how the variable is specified. """ diff --git a/scons/scons-local-2.4.1/SCons/Platform/__init__.py b/scons/scons-local-2.5.0/SCons/Platform/__init__.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Platform/__init__.py rename to scons/scons-local-2.5.0/SCons/Platform/__init__.py index d8be160dc..e3db28a32 100644 --- a/scons/scons-local-2.4.1/SCons/Platform/__init__.py +++ b/scons/scons-local-2.5.0/SCons/Platform/__init__.py @@ -12,7 +12,7 @@ environment. Consequently, we'll examine both sys.platform and os.name (and anything else that might come in to play) in order to return some specification which is unique enough for our purposes. -Note that because this subsysem just *selects* a callable that can +Note that because this subsystem just *selects* a callable that can modify a construction environment, it's possible for people to define their own "platform specification" in an arbitrary callable function. No one needs to use or tie in to this subsystem in order to roll @@ -20,7 +20,7 @@ their own platform definition. """ # -# 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 @@ -42,7 +42,7 @@ their own platform definition. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Platform/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.compat diff --git a/scons/scons-local-2.4.1/SCons/Platform/aix.py b/scons/scons-local-2.5.0/SCons/Platform/aix.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Platform/aix.py rename to scons/scons-local-2.5.0/SCons/Platform/aix.py index f36eab68c..65ee701e2 100644 --- a/scons/scons-local-2.4.1/SCons/Platform/aix.py +++ b/scons/scons-local-2.5.0/SCons/Platform/aix.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/aix.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Platform/aix.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import subprocess diff --git a/scons/scons-local-2.4.1/SCons/Platform/cygwin.py b/scons/scons-local-2.5.0/SCons/Platform/cygwin.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Platform/cygwin.py rename to scons/scons-local-2.5.0/SCons/Platform/cygwin.py index a901ac363..3f8fc1789 100644 --- a/scons/scons-local-2.4.1/SCons/Platform/cygwin.py +++ b/scons/scons-local-2.5.0/SCons/Platform/cygwin.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/cygwin.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Platform/cygwin.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import posix from SCons.Platform import TempFileMunge diff --git a/scons/scons-local-2.4.1/SCons/Platform/darwin.py b/scons/scons-local-2.5.0/SCons/Platform/darwin.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Platform/darwin.py rename to scons/scons-local-2.5.0/SCons/Platform/darwin.py index 73f140f4e..279cfc296 100644 --- a/scons/scons-local-2.4.1/SCons/Platform/darwin.py +++ b/scons/scons-local-2.5.0/SCons/Platform/darwin.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/darwin.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Platform/darwin.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import posix import os diff --git a/scons/scons-local-2.4.1/SCons/Platform/hpux.py b/scons/scons-local-2.5.0/SCons/Platform/hpux.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Platform/hpux.py rename to scons/scons-local-2.5.0/SCons/Platform/hpux.py index 36e676415..d2de3035d 100644 --- a/scons/scons-local-2.4.1/SCons/Platform/hpux.py +++ b/scons/scons-local-2.5.0/SCons/Platform/hpux.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/hpux.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Platform/hpux.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import posix diff --git a/scons/scons-local-2.4.1/SCons/Platform/irix.py b/scons/scons-local-2.5.0/SCons/Platform/irix.py similarity index 90% rename from scons/scons-local-2.4.1/SCons/Platform/irix.py rename to scons/scons-local-2.5.0/SCons/Platform/irix.py index e947b5484..c55713108 100644 --- a/scons/scons-local-2.4.1/SCons/Platform/irix.py +++ b/scons/scons-local-2.5.0/SCons/Platform/irix.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/irix.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Platform/irix.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import posix diff --git a/scons/scons-local-2.4.1/SCons/Platform/os2.py b/scons/scons-local-2.5.0/SCons/Platform/os2.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Platform/os2.py rename to scons/scons-local-2.5.0/SCons/Platform/os2.py index 5f32844d0..736363608 100644 --- a/scons/scons-local-2.4.1/SCons/Platform/os2.py +++ b/scons/scons-local-2.5.0/SCons/Platform/os2.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/os2.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Platform/os2.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import win32 def generate(env): diff --git a/scons/scons-local-2.4.1/SCons/Platform/posix.py b/scons/scons-local-2.5.0/SCons/Platform/posix.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Platform/posix.py rename to scons/scons-local-2.5.0/SCons/Platform/posix.py index 78e80f301..6edfd784a 100644 --- a/scons/scons-local-2.4.1/SCons/Platform/posix.py +++ b/scons/scons-local-2.5.0/SCons/Platform/posix.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/posix.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Platform/posix.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import errno import os @@ -48,16 +48,18 @@ exitvalmap = { } def escape(arg): - "escape shell special characters" + "escape shell special characters" slash = '\\' - special = '"$()' + special = '"$' arg = arg.replace(slash, slash+slash) for c in special: arg = arg.replace(c, slash+c) + # print "ESCAPE RESULT: %s"%arg return '"' + arg + '"' + def exec_subprocess(l, env): proc = subprocess.Popen(l, env = env, close_fds = True) return proc.wait() diff --git a/scons/scons-local-2.4.1/SCons/Platform/sunos.py b/scons/scons-local-2.5.0/SCons/Platform/sunos.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Platform/sunos.py rename to scons/scons-local-2.5.0/SCons/Platform/sunos.py index 7646eb7e3..d053e2180 100644 --- a/scons/scons-local-2.4.1/SCons/Platform/sunos.py +++ b/scons/scons-local-2.5.0/SCons/Platform/sunos.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/sunos.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Platform/sunos.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import posix diff --git a/scons/scons-local-2.4.1/SCons/Platform/win32.py b/scons/scons-local-2.5.0/SCons/Platform/win32.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Platform/win32.py rename to scons/scons-local-2.5.0/SCons/Platform/win32.py index f5c787af6..556c7d480 100644 --- a/scons/scons-local-2.4.1/SCons/Platform/win32.py +++ b/scons/scons-local-2.5.0/SCons/Platform/win32.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/win32.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Platform/win32.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import os.path @@ -60,10 +60,8 @@ except AttributeError: else: parallel_msg = None - import builtins - - _builtin_file = builtins.file - _builtin_open = builtins.open + _builtin_file = file + _builtin_open = open class _scons_file(_builtin_file): def __init__(self, *args, **kw): @@ -78,8 +76,8 @@ else: 0) return fp - builtins.file = _scons_file - builtins.open = _scons_open + file = _scons_file + open = _scons_open try: import threading diff --git a/scons/scons-local-2.4.1/SCons/SConf.py b/scons/scons-local-2.5.0/SCons/SConf.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/SConf.py rename to scons/scons-local-2.5.0/SCons/SConf.py index 5a158564f..fb1124b1f 100644 --- a/scons/scons-local-2.4.1/SCons/SConf.py +++ b/scons/scons-local-2.5.0/SCons/SConf.py @@ -12,7 +12,7 @@ libraries are installed, if some command line options are supported etc. """ # -# 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 @@ -34,7 +34,7 @@ libraries are installed, if some command line options are supported etc. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/SConf.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/SConf.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.compat @@ -254,14 +254,7 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask): else: self.display('Caught exception while building "%s":\n' % self.targets[0]) - try: - excepthook = sys.excepthook - except AttributeError: - # Earlier versions of Python don't have sys.excepthook... - def excepthook(type, value, tb): - traceback.print_tb(tb) - print type, value - excepthook(*self.exc_info()) + sys.excepthook(*self.exc_info()) return SCons.Taskmaster.Task.failed(self) def collect_node_states(self): @@ -355,8 +348,6 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask): raise SCons.Errors.ExplicitExit(self.targets[0],exc_value.code) except Exception, e: for t in self.targets: - #binfo = t.get_binfo() - #binfo.__class__ = SConfBuildInfo binfo = SConfBuildInfo() binfo.merge(t.get_binfo()) binfo.set_build_result(1, s.getvalue()) @@ -375,8 +366,6 @@ class SConfBuildTask(SCons.Taskmaster.AlwaysTask): raise e else: for t in self.targets: - #binfo = t.get_binfo() - #binfo.__class__ = SConfBuildInfo binfo = SConfBuildInfo() binfo.merge(t.get_binfo()) binfo.set_build_result(0, s.getvalue()) @@ -399,16 +388,16 @@ class SConfBase(object): tests, be sure to call the Finish() method, which returns the modified environment. Some words about caching: In most cases, it is not necessary to cache - Test results explicitely. Instead, we use the scons dependency checking + Test results explicitly. Instead, we use the scons dependency checking mechanism. For example, if one wants to compile a test program (SConf.TryLink), the compiler is only called, if the program dependencies have changed. However, if the program could not be compiled in a former - SConf run, we need to explicitely cache this error. + SConf run, we need to explicitly cache this error. """ def __init__(self, env, custom_tests = {}, conf_dir='$CONFIGUREDIR', log_file='$CONFIGURELOG', config_h = None, _depth = 0): - """Constructor. Pass additional tests in the custom_tests-dictinary, + """Constructor. Pass additional tests in the custom_tests-dictionary, e.g. custom_tests={'CheckPrivate':MyPrivateTest}, where MyPrivateTest defines a custom test. Note also the conf_dir and log_file arguments (you may want to @@ -766,10 +755,10 @@ class CheckContext(object): A typical test is just a callable with an instance of CheckContext as first argument: - def CheckCustom(context, ...) - context.Message('Checking my weird test ... ') - ret = myWeirdTestFunction(...) - context.Result(ret) + def CheckCustom(context, ...): + context.Message('Checking my weird test ... ') + ret = myWeirdTestFunction(...) + context.Result(ret) Often, myWeirdTestFunction will be one of context.TryCompile/context.TryLink/context.TryRun. The results of diff --git a/scons/scons-local-2.4.1/SCons/SConsign.py b/scons/scons-local-2.5.0/SCons/SConsign.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/SConsign.py rename to scons/scons-local-2.5.0/SCons/SConsign.py index 7ce8c5ec2..3166258a3 100644 --- a/scons/scons-local-2.4.1/SCons/SConsign.py +++ b/scons/scons-local-2.5.0/SCons/SConsign.py @@ -5,7 +5,7 @@ Writing and reading information to the .sconsign file or files. """ # -# 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 @@ -27,7 +27,7 @@ Writing and reading information to the .sconsign file or files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/SConsign.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/SConsign.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.compat diff --git a/scons/scons-local-2.4.1/SCons/Scanner/C.py b/scons/scons-local-2.5.0/SCons/Scanner/C.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Scanner/C.py rename to scons/scons-local-2.5.0/SCons/Scanner/C.py index bdccb34d3..4c6118739 100644 --- a/scons/scons-local-2.4.1/SCons/Scanner/C.py +++ b/scons/scons-local-2.5.0/SCons/Scanner/C.py @@ -1,11 +1,11 @@ """SCons.Scanner.C -This module implements the depenency scanner for C/C++ code. +This module implements the dependency scanner for C/C++ code. """ # -# 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 @@ -27,7 +27,7 @@ This module implements the depenency scanner for C/C++ code. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/C.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Scanner/C.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.4.1/SCons/Scanner/D.py b/scons/scons-local-2.5.0/SCons/Scanner/D.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Scanner/D.py rename to scons/scons-local-2.5.0/SCons/Scanner/D.py index 0b917d582..eba6e385a 100644 --- a/scons/scons-local-2.4.1/SCons/Scanner/D.py +++ b/scons/scons-local-2.5.0/SCons/Scanner/D.py @@ -8,7 +8,7 @@ Coded by Andy Friesen """ # -# 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 @@ Coded by Andy Friesen # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/D.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Scanner/D.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import re diff --git a/scons/scons-local-2.4.1/SCons/Scanner/Dir.py b/scons/scons-local-2.5.0/SCons/Scanner/Dir.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Scanner/Dir.py rename to scons/scons-local-2.5.0/SCons/Scanner/Dir.py index 6956d64fc..d744c41fc 100644 --- a/scons/scons-local-2.4.1/SCons/Scanner/Dir.py +++ b/scons/scons-local-2.5.0/SCons/Scanner/Dir.py @@ -1,5 +1,5 @@ # -# 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 @@ -20,7 +20,7 @@ # 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/Scanner/Dir.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Scanner/Dir.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.4.1/SCons/Scanner/Fortran.py b/scons/scons-local-2.5.0/SCons/Scanner/Fortran.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Scanner/Fortran.py rename to scons/scons-local-2.5.0/SCons/Scanner/Fortran.py index 97cd3b261..887232ff1 100644 --- a/scons/scons-local-2.4.1/SCons/Scanner/Fortran.py +++ b/scons/scons-local-2.5.0/SCons/Scanner/Fortran.py @@ -5,7 +5,7 @@ This module implements the dependency scanner for Fortran code. """ # -# 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 @@ -26,7 +26,7 @@ This module implements the dependency scanner for Fortran code. # 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/Scanner/Fortran.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Scanner/Fortran.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import re diff --git a/scons/scons-local-2.4.1/SCons/Scanner/IDL.py b/scons/scons-local-2.5.0/SCons/Scanner/IDL.py similarity index 88% rename from scons/scons-local-2.4.1/SCons/Scanner/IDL.py rename to scons/scons-local-2.5.0/SCons/Scanner/IDL.py index 0df939ca1..84616e938 100644 --- a/scons/scons-local-2.4.1/SCons/Scanner/IDL.py +++ b/scons/scons-local-2.5.0/SCons/Scanner/IDL.py @@ -1,12 +1,12 @@ """SCons.Scanner.IDL -This module implements the depenency scanner for IDL (Interface +This module implements the dependency scanner for IDL (Interface Definition Language) files. """ # -# 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 @@ -28,7 +28,7 @@ Definition Language) files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/IDL.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Scanner/IDL.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.4.1/SCons/Scanner/LaTeX.py b/scons/scons-local-2.5.0/SCons/Scanner/LaTeX.py similarity index 99% rename from scons/scons-local-2.4.1/SCons/Scanner/LaTeX.py rename to scons/scons-local-2.5.0/SCons/Scanner/LaTeX.py index 487627ca0..10a61973e 100644 --- a/scons/scons-local-2.4.1/SCons/Scanner/LaTeX.py +++ b/scons/scons-local-2.5.0/SCons/Scanner/LaTeX.py @@ -5,7 +5,7 @@ This module implements the dependency scanner for LaTeX code. """ # -# 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 @@ -27,7 +27,7 @@ This module implements the dependency scanner for LaTeX code. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/LaTeX.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Scanner/LaTeX.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path import re diff --git a/scons/scons-local-2.4.1/SCons/Scanner/Prog.py b/scons/scons-local-2.5.0/SCons/Scanner/Prog.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Scanner/Prog.py rename to scons/scons-local-2.5.0/SCons/Scanner/Prog.py index d464c89fd..de842d5e2 100644 --- a/scons/scons-local-2.4.1/SCons/Scanner/Prog.py +++ b/scons/scons-local-2.5.0/SCons/Scanner/Prog.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/Prog.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Scanner/Prog.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Node import SCons.Node.FS diff --git a/scons/scons-local-2.4.1/SCons/Scanner/RC.py b/scons/scons-local-2.5.0/SCons/Scanner/RC.py similarity index 89% rename from scons/scons-local-2.4.1/SCons/Scanner/RC.py rename to scons/scons-local-2.5.0/SCons/Scanner/RC.py index ea3893b2b..527a0fbf8 100644 --- a/scons/scons-local-2.4.1/SCons/Scanner/RC.py +++ b/scons/scons-local-2.5.0/SCons/Scanner/RC.py @@ -1,12 +1,12 @@ """SCons.Scanner.RC -This module implements the depenency scanner for RC (Interface +This module implements the dependency scanner for RC (Interface Definition Language) files. """ # -# 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 @@ -28,7 +28,7 @@ Definition Language) files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/RC.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Scanner/RC.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.4.1/SCons/compat/_scons_io.py b/scons/scons-local-2.5.0/SCons/Scanner/SWIG.py similarity index 65% rename from scons/scons-local-2.4.1/SCons/compat/_scons_io.py rename to scons/scons-local-2.5.0/SCons/Scanner/SWIG.py index 25cf11960..1e70ddc83 100644 --- a/scons/scons-local-2.4.1/SCons/compat/_scons_io.py +++ b/scons/scons-local-2.5.0/SCons/Scanner/SWIG.py @@ -1,5 +1,11 @@ +"""SCons.Scanner.SWIG + +This module implements the dependency scanner for SWIG code. + +""" + # -# 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 @@ -21,22 +27,16 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__doc__ = """ -io compatibility module for older (pre-2.6) Python versions +__revision__ = "src/engine/SCons/Scanner/SWIG.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" -This does not not NOT (repeat, *NOT*) provide complete io -functionality. It only wraps the portions of io functionality used -by SCons, in an interface that looks enough like io for our purposes. -""" +import SCons.Scanner -__revision__ = "src/engine/SCons/compat/_scons_io.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +SWIGSuffixes = [ '.i' ] -# Use the "imp" module to protect the imports below from fixers. -import imp - -_cStringIO = imp.load_module('cStringIO', *imp.find_module('cStringIO')) -StringIO = _cStringIO.StringIO -del _cStringIO +def SWIGScanner(): + expr = '^[ \t]*%[ \t]*(?:include|import|extern)[ \t]*(<|"?)([^>\s"]+)(?:>|"?)' + scanner = SCons.Scanner.ClassicCPP("SWIGScanner", ".i", "SWIGPATH", expr) + return scanner # Local Variables: # tab-width:4 diff --git a/scons/scons-local-2.4.1/SCons/Scanner/__init__.py b/scons/scons-local-2.5.0/SCons/Scanner/__init__.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Scanner/__init__.py rename to scons/scons-local-2.5.0/SCons/Scanner/__init__.py index aca07e2c3..b13120cea 100644 --- a/scons/scons-local-2.4.1/SCons/Scanner/__init__.py +++ b/scons/scons-local-2.5.0/SCons/Scanner/__init__.py @@ -5,7 +5,7 @@ The Scanner package for the SCons software construction utility. """ # -# 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 @@ -27,7 +27,7 @@ The Scanner package for the SCons software construction utility. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Scanner/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import re diff --git a/scons/scons-local-2.4.1/SCons/Script/Interactive.py b/scons/scons-local-2.5.0/SCons/Script/Interactive.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Script/Interactive.py rename to scons/scons-local-2.5.0/SCons/Script/Interactive.py index afb35af02..bb9ab9332 100644 --- a/scons/scons-local-2.4.1/SCons/Script/Interactive.py +++ b/scons/scons-local-2.5.0/SCons/Script/Interactive.py @@ -1,5 +1,5 @@ # -# 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 @@ -20,7 +20,7 @@ # 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/Script/Interactive.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Script/Interactive.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """ SCons interactive mode @@ -304,14 +304,8 @@ class SConsInteractiveCmd(cmd.Cmd): return self._strip_initial_spaces(doc) def _strip_initial_spaces(self, s): - #lines = s.split('\n') lines = s.split('\n') spaces = re.match(' *', lines[0]).group(0) - #def strip_spaces(l): - # if l.startswith(spaces): - # l = l[len(spaces):] - # return l - #return '\n'.join([ strip_spaces(l) for l in lines ]) def strip_spaces(l, spaces=spaces): if l[:len(spaces)] == spaces: l = l[len(spaces):] diff --git a/scons/scons-local-2.4.1/SCons/Script/Main.py b/scons/scons-local-2.5.0/SCons/Script/Main.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Script/Main.py rename to scons/scons-local-2.5.0/SCons/Script/Main.py index d1ed77a5f..d7c3a5940 100644 --- a/scons/scons-local-2.4.1/SCons/Script/Main.py +++ b/scons/scons-local-2.5.0/SCons/Script/Main.py @@ -10,10 +10,10 @@ some other module. If it's specific to the "scons" script invocation, it goes here. """ -unsupported_python_version = (2, 3, 0) +unsupported_python_version = (2, 6, 0) deprecated_python_version = (2, 7, 0) -# 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 @@ -34,7 +34,7 @@ deprecated_python_version = (2, 7, 0) # 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/Script/Main.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Script/Main.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.compat @@ -43,15 +43,6 @@ import sys import time import traceback -# Strip the script directory from sys.path() so on case-insensitive -# (Windows) systems Python doesn't think that the "scons" script is the -# "SCons" package. Replace it with our own version directory so, if -# if they're there, we pick up the right version of the build engine -# modules. -#sys.path = [os.path.join(sys.prefix, -# 'lib', -# 'scons-%d' % SCons.__version__)] + sys.path[1:] - import SCons.CacheDir import SCons.Debug import SCons.Defaults @@ -74,7 +65,7 @@ def fetch_win32_parallel_msg(): # so we don't have to pull it in on all platforms, and so that an # in-line "import" statement in the _main() function below doesn't # cause warnings about local names shadowing use of the 'SCons' - # globl in nest scopes and UnboundLocalErrors and the like in some + # global in nest scopes and UnboundLocalErrors and the like in some # versions (2.1) of Python. import SCons.Platform.win32 return SCons.Platform.win32.parallel_msg @@ -368,7 +359,7 @@ class CleanTask(SCons.Taskmaster.AlwaysTask): # issue, an IOError would indicate something like # the file not existing. In either case, print a # message and keep going to try to remove as many - # targets aa possible. + # targets as possible. print "scons: Could not remove '%s':" % str(t), e.strerror else: if removed: @@ -383,7 +374,7 @@ class CleanTask(SCons.Taskmaster.AlwaysTask): # we don't want, like store .sconsign information. executed = SCons.Taskmaster.Task.executed_without_callbacks - # Have the taskmaster arrange to "execute" all of the targets, because + # Have the Taskmaster arrange to "execute" all of the targets, because # we'll figure out ourselves (in remove() or show() above) whether # anything really needs to be done. make_ready = SCons.Taskmaster.Task.make_ready_all @@ -487,7 +478,6 @@ def SetOption(name, value): def PrintHelp(file=None): OptionsParser.print_help(file=file) -# class Stats(object): def __init__(self): self.stats = [] @@ -711,7 +701,6 @@ def _load_site_scons_dir(topdir, site_dir_name=None): site_tools_dir = os.path.join(site_dir, site_tools_dirname) if os.path.exists(site_init_file): import imp, re - # TODO(2.4): turn this into try:-except:-finally: try: try: fp, pathname, description = imp.find_module(site_init_modname, @@ -1024,7 +1013,7 @@ def _main(parser): # the SConscript file. # # We delay enabling the PythonVersionWarning class until here so that, - # if they explicity disabled it in either in the command line or in + # if they explicitly disabled it in either in the command line or in # $SCONSFLAGS, or in the SConscript file, then the search through # the list of deprecated warning classes will find that disabling # first and not issue the warning. @@ -1232,13 +1221,8 @@ def _build_targets(fs, options, targets, target_top): def order(dependencies): """Randomize the dependencies.""" import random - # This is cribbed from the implementation of - # random.shuffle() in Python 2.X. - d = dependencies - for i in range(len(d)-1, 0, -1): - j = int(random.random() * (i+1)) - d[i], d[j] = d[j], d[i] - return d + random.shuffle(dependencies) + return dependencies else: def order(dependencies): """Leave the order of dependencies alone.""" @@ -1316,18 +1300,6 @@ def _exec_main(parser, values): # compat layer imports "cProfile" for us if it's available. from profile import Profile - # Some versions of Python 2.4 shipped a profiler that had the - # wrong 'c_exception' entry in its dispatch table. Make sure - # we have the right one. (This may put an unnecessary entry - # in the table in earlier versions of Python, but its presence - # shouldn't hurt anything). - try: - dispatch = Profile.dispatch - except AttributeError: - pass - else: - dispatch['c_exception'] = Profile.trace_dispatch_return - prof = Profile() try: prof.runcall(_main, parser) @@ -1360,7 +1332,7 @@ def main(): pass parts.append(version_string("engine", SCons)) parts.append(path_string("engine", SCons)) - parts.append("Copyright (c) 2001 - 2015 The SCons Foundation") + parts.append("Copyright (c) 2001 - 2016 The SCons Foundation") version = ''.join(parts) import SConsOptions diff --git a/scons/scons-local-2.4.1/SCons/Script/SConsOptions.py b/scons/scons-local-2.5.0/SCons/Script/SConsOptions.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Script/SConsOptions.py rename to scons/scons-local-2.5.0/SCons/Script/SConsOptions.py index 6d02b0a65..9e9d5ce0c 100644 --- a/scons/scons-local-2.4.1/SCons/Script/SConsOptions.py +++ b/scons/scons-local-2.5.0/SCons/Script/SConsOptions.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Script/SConsOptions.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Script/SConsOptions.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import optparse import re @@ -426,7 +426,7 @@ class SConsOptionParser(optparse.OptionParser): result = group.add_option(*args, **kw) if result: - # The option was added succesfully. We now have to add the + # The option was added successfully. We now have to add the # default value to our object that holds the default values # (so that an attempt to fetch the option's attribute will # yield the default value when not overridden) and then @@ -449,11 +449,6 @@ class SConsIndentedHelpFormatter(optparse.IndentedHelpFormatter): "SCons Options." Unfortunately, we have to do this here, because those titles are hard-coded in the optparse calls. """ - if heading == 'options': - # The versions of optparse.py shipped with Pythons 2.3 and - # 2.4 pass this in uncapitalized; override that so we get - # consistent output on all versions. - heading = "Options" if heading == 'Options': heading = "SCons Options" return optparse.IndentedHelpFormatter.format_heading(self, heading) @@ -488,13 +483,7 @@ class SConsIndentedHelpFormatter(optparse.IndentedHelpFormatter): # read data from FILENAME result = [] - try: - opts = self.option_strings[option] - except AttributeError: - # The Python 2.3 version of optparse attaches this to - # to the option argument, not to this object. - opts = option.option_strings - + opts = self.option_strings[option] opt_width = self.help_position - self.current_indent - 2 if len(opts) > opt_width: wrapper = textwrap.TextWrapper(width=self.width, @@ -509,14 +498,7 @@ class SConsIndentedHelpFormatter(optparse.IndentedHelpFormatter): result.append(opts) if option.help: - try: - expand_default = self.expand_default - except AttributeError: - # The HelpFormatter base class in the Python 2.3 version - # of optparse has no expand_default() method. - help_text = option.help - else: - help_text = expand_default(option) + help_text = self.expand_default(option) # SCons: indent every line of the help text but the first. wrapper = textwrap.TextWrapper(width=self.help_width, @@ -530,34 +512,6 @@ class SConsIndentedHelpFormatter(optparse.IndentedHelpFormatter): result.append("\n") return "".join(result) - # For consistent help output across Python versions, we provide a - # subclass copy of format_option_strings() and these two variables. - # This is necessary (?) for Python2.3, which otherwise concatenates - # a short option with its metavar. - _short_opt_fmt = "%s %s" - _long_opt_fmt = "%s=%s" - - def format_option_strings(self, option): - """Return a comma-separated list of option strings & metavariables.""" - if option.takes_value(): - metavar = option.metavar or option.dest.upper() - short_opts = [] - for sopt in option._short_opts: - short_opts.append(self._short_opt_fmt % (sopt, metavar)) - long_opts = [] - for lopt in option._long_opts: - long_opts.append(self._long_opt_fmt % (lopt, metavar)) - else: - short_opts = option._short_opts - long_opts = option._long_opts - - if self.short_first: - opts = short_opts + long_opts - else: - opts = long_opts + short_opts - - return ", ".join(opts) - def Parser(version): """ Returns an options parser object initialized with the standard diff --git a/scons/scons-local-2.4.1/SCons/Script/SConscript.py b/scons/scons-local-2.5.0/SCons/Script/SConscript.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Script/SConscript.py rename to scons/scons-local-2.5.0/SCons/Script/SConscript.py index 2d66f5c5a..3f6c4e393 100644 --- a/scons/scons-local-2.4.1/SCons/Script/SConscript.py +++ b/scons/scons-local-2.5.0/SCons/Script/SConscript.py @@ -6,7 +6,7 @@ files. """ # -# 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 @@ -28,7 +28,7 @@ files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from __future__ import division -__revision__ = "src/engine/SCons/Script/SConscript.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Script/SConscript.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons import SCons.Action @@ -52,16 +52,6 @@ import re import sys import traceback -# The following variables used to live in this module. Some -# SConscript files out there may have referred to them directly as -# SCons.Script.SConscript.*. This is now supported by some special -# handling towards the bottom of the SConscript.__init__.py module. -#Arguments = {} -#ArgList = [] -#BuildTargets = TargetList() -#CommandLineTargets = [] -#DefaultTargets = [] - class SConscriptReturn(Exception): pass @@ -446,7 +436,7 @@ class SConsEnvironment(SCons.Environment.Base): # # Public methods of an SConsEnvironment. These get - # entry points in the global name space so they can be called + # entry points in the global namespace so they can be called # as global functions. # diff --git a/scons/scons-local-2.4.1/SCons/Script/__init__.py b/scons/scons-local-2.5.0/SCons/Script/__init__.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Script/__init__.py rename to scons/scons-local-2.5.0/SCons/Script/__init__.py index f9c4e514e..56f06cfcc 100644 --- a/scons/scons-local-2.4.1/SCons/Script/__init__.py +++ b/scons/scons-local-2.5.0/SCons/Script/__init__.py @@ -12,7 +12,7 @@ it goes here. """ # -# 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 @@ -34,7 +34,7 @@ it goes here. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Script/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Script/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import time start_time = time.time() @@ -270,12 +270,6 @@ def HelpFunction(text, append=False): s.close() else: help_text = "" -# -# Was in original patch but this text is arbitrary and breaks tests -# so I removed it (Deegan) -# help_text = help_text + "\nLocal Build Variables:\n" + text -# else: -# help_text = help_text + text help_text= help_text + text diff --git a/scons/scons-local-2.4.1/SCons/Sig.py b/scons/scons-local-2.5.0/SCons/Sig.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Sig.py rename to scons/scons-local-2.5.0/SCons/Sig.py index 6069d55d4..2d090982b 100644 --- a/scons/scons-local-2.4.1/SCons/Sig.py +++ b/scons/scons-local-2.5.0/SCons/Sig.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Sig.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Sig.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Place-holder for the old SCons.Sig module hierarchy diff --git a/scons/scons-local-2.4.1/SCons/Subst.py b/scons/scons-local-2.5.0/SCons/Subst.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Subst.py rename to scons/scons-local-2.5.0/SCons/Subst.py index 8a3a35963..63c15423b 100644 --- a/scons/scons-local-2.4.1/SCons/Subst.py +++ b/scons/scons-local-2.5.0/SCons/Subst.py @@ -5,7 +5,7 @@ SCons string substitution. """ # -# 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 @@ -26,7 +26,7 @@ SCons string substitution. # 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/Subst.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Subst.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import collections import re @@ -344,7 +344,6 @@ _remove = re.compile(r'\$\([^\$]*(\$[^\)][^\$]*)*\$\)') _regex_remove = [ _rm, None, _remove ] def _rm_list(list): - #return [ l for l in list if not l in ('$(', '$)') ] return [l for l in list if not l in ('$(', '$)')] def _remove_list(list): @@ -580,8 +579,6 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={ return result -#Subst_List_Strings = {} - def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={}, lvars={}, conv=None): """Substitute construction variables in a string (or list or other object) and separate the arguments into a command list. @@ -590,12 +587,6 @@ def scons_subst_list(strSubst, env, mode=SUBST_RAW, target=None, source=None, gv substitutions within strings, so see that function instead if that's what you're looking for. """ -# try: -# Subst_List_Strings[strSubst] = Subst_List_Strings[strSubst] + 1 -# except KeyError: -# Subst_List_Strings[strSubst] = 1 -# import SCons.Debug -# SCons.Debug.caller_trace(1) class ListSubber(collections.UserList): """A class to construct the results of a scons_subst_list() call. diff --git a/scons/scons-local-2.4.1/SCons/Taskmaster.py b/scons/scons-local-2.5.0/SCons/Taskmaster.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Taskmaster.py rename to scons/scons-local-2.5.0/SCons/Taskmaster.py index f77bde1fb..829e1fc30 100644 --- a/scons/scons-local-2.4.1/SCons/Taskmaster.py +++ b/scons/scons-local-2.5.0/SCons/Taskmaster.py @@ -1,5 +1,5 @@ # -# 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 @@ -47,7 +47,7 @@ interface and the SCons build engine. There are two key classes here: target(s) that it decides need to be evaluated and/or built. """ -__revision__ = "src/engine/SCons/Taskmaster.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Taskmaster.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" from itertools import chain import operator @@ -107,7 +107,7 @@ fmt = "%(considered)3d "\ def dump_stats(): for n in sorted(StatsNodes, key=lambda a: str(a)): - print (fmt % n.stats.__dict__) + str(n) + print (fmt % n.attributes.stats.__dict__) + str(n) @@ -122,7 +122,7 @@ class Task(object): aspects of controlling a build, so any given application *should* be able to do what it wants by sub-classing this class and overriding methods as appropriate. If an application - needs to customze something by sub-classing Taskmaster (or + needs to customize something by sub-classing Taskmaster (or some other build engine class), we should first try to migrate that functionality into this class. @@ -147,7 +147,7 @@ class Task(object): This hook gets called as part of preparing a task for execution (that is, a Node to be built). As part of figuring out what Node - should be built next, the actually target list may be altered, + should be built next, the actual target list may be altered, along with a message describing the alteration. The calling interface can subclass Task and provide a concrete implementation of this method to see those messages. @@ -664,9 +664,9 @@ class Taskmaster(object): its parent node. A pending child can occur when the Taskmaster completes a loop - through a cycle. For example, lets imagine a graph made of - three node (A, B and C) making a cycle. The evaluation starts - at node A. The taskmaster first consider whether node A's + through a cycle. For example, let's imagine a graph made of + three nodes (A, B and C) making a cycle. The evaluation starts + at node A. The Taskmaster first considers whether node A's child B is up-to-date. Then, recursively, node B needs to check whether node C is up-to-date. This leaves us with a dependency graph looking like: @@ -781,10 +781,10 @@ class Taskmaster(object): # return node if CollectStats: - if not hasattr(node, 'stats'): - node.stats = Stats() + if not hasattr(node.attributes, 'stats'): + node.attributes.stats = Stats() StatsNodes.append(node) - S = node.stats + S = node.attributes.stats S.considered = S.considered + 1 else: S = None @@ -951,7 +951,7 @@ class Taskmaster(object): task.make_ready() except: # We had a problem just trying to get this task ready (like - # a child couldn't be linked in to a VariantDir when deciding + # a child couldn't be linked to a VariantDir when deciding # whether this node is current). Arrange to raise the # exception when the Task is "executed." self.ready_exc = sys.exc_info() diff --git a/scons/scons-local-2.4.1/SCons/Tool/386asm.py b/scons/scons-local-2.5.0/SCons/Tool/386asm.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/386asm.py rename to scons/scons-local-2.5.0/SCons/Tool/386asm.py index 56b8b3858..2a87a2819 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/386asm.py +++ b/scons/scons-local-2.5.0/SCons/Tool/386asm.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/386asm.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/386asm.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" from SCons.Tool.PharLapCommon import addPharLapPaths import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/BitKeeper.py b/scons/scons-local-2.5.0/SCons/Tool/BitKeeper.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/BitKeeper.py rename to scons/scons-local-2.5.0/SCons/Tool/BitKeeper.py index 88fabd1e2..21a2ab3da 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/BitKeeper.py +++ b/scons/scons-local-2.5.0/SCons/Tool/BitKeeper.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/BitKeeper.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/BitKeeper.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Builder @@ -49,7 +49,6 @@ def generate(env): act = SCons.Action.Action("$BITKEEPERCOM", "$BITKEEPERCOMSTR") return SCons.Builder.Builder(action = act, env = env) - #setattr(env, 'BitKeeper', BitKeeperFactory) env.BitKeeper = BitKeeperFactory env['BITKEEPER'] = 'bk' diff --git a/scons/scons-local-2.4.1/SCons/Tool/CVS.py b/scons/scons-local-2.5.0/SCons/Tool/CVS.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/CVS.py rename to scons/scons-local-2.5.0/SCons/Tool/CVS.py index e85223680..91a8d627a 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/CVS.py +++ b/scons/scons-local-2.5.0/SCons/Tool/CVS.py @@ -8,7 +8,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 @@ -29,7 +29,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/CVS.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/CVS.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Builder @@ -55,7 +55,6 @@ def generate(env): CVSREPOSITORY = repos, CVSMODULE = module) - #setattr(env, 'CVS', CVSFactory) env.CVS = CVSFactory env['CVS'] = 'cvs' diff --git a/scons/scons-local-2.4.1/SCons/Tool/DCommon.py b/scons/scons-local-2.5.0/SCons/Tool/DCommon.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/DCommon.py rename to scons/scons-local-2.5.0/SCons/Tool/DCommon.py index c38334932..8738ece72 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/DCommon.py +++ b/scons/scons-local-2.5.0/SCons/Tool/DCommon.py @@ -6,7 +6,7 @@ Coded by Russel Winder (russel@winder.org.uk) 2012-09-06 """ # -# 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 @@ -28,7 +28,7 @@ Coded by Russel Winder (russel@winder.org.uk) # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/DCommon.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/DCommon.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/FortranCommon.py b/scons/scons-local-2.5.0/SCons/Tool/FortranCommon.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/FortranCommon.py rename to scons/scons-local-2.5.0/SCons/Tool/FortranCommon.py index 45bd6485e..cf6486880 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/FortranCommon.py +++ b/scons/scons-local-2.5.0/SCons/Tool/FortranCommon.py @@ -5,7 +5,7 @@ Stuff for processing Fortran, common to all fortran dialects. """ # -# 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 @@ -27,7 +27,7 @@ Stuff for processing Fortran, common to all fortran dialects. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/FortranCommon.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/FortranCommon.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import re import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/GettextCommon.py b/scons/scons-local-2.5.0/SCons/Tool/GettextCommon.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/GettextCommon.py rename to scons/scons-local-2.5.0/SCons/Tool/GettextCommon.py index 36f8fa23a..6dfb615b5 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/GettextCommon.py +++ b/scons/scons-local-2.5.0/SCons/Tool/GettextCommon.py @@ -3,7 +3,7 @@ Used by several tools of `gettext` toolset. """ -# 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 @@ -24,7 +24,7 @@ Used by several tools of `gettext` toolset. # 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/GettextCommon.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/GettextCommon.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Warnings import re @@ -251,7 +251,7 @@ class RPaths(object): recently re-created. For such reason, we need a function, which always returns relative paths. This is the purpose of `RPaths` callable object. - The `__call__` method returns paths relative to current woking directory, but + The `__call__` method returns paths relative to current working directory, but we assume, that *xgettext(1)* is run from the directory, where target file is going to be created. @@ -330,7 +330,7 @@ def _init_po_files(target, source, env): autoinit = False # Well, if everything outside works well, this loop should do single # iteration. Otherwise we are rebuilding all the targets even, if just - # one has changed (but is this out fault?). + # one has changed (but is this our fault?). for tgt in target: if not tgt.exists(): if autoinit: diff --git a/scons/scons-local-2.4.1/SCons/Tool/JavaCommon.py b/scons/scons-local-2.5.0/SCons/Tool/JavaCommon.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/JavaCommon.py rename to scons/scons-local-2.5.0/SCons/Tool/JavaCommon.py index 0c149957f..26be53027 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/JavaCommon.py +++ b/scons/scons-local-2.5.0/SCons/Tool/JavaCommon.py @@ -5,7 +5,7 @@ Stuff for processing Java. """ # -# 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 @@ -27,7 +27,7 @@ Stuff for processing Java. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/JavaCommon.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/JavaCommon.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/__init__.py b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/__init__.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/MSCommon/__init__.py rename to scons/scons-local-2.5.0/SCons/Tool/MSCommon/__init__.py index 6340a3048..8e72feaea 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/__init__.py +++ b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/__init__.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """ Common functions for Microsoft Visual Studio and Visual C/C++. diff --git a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/arch.py b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/arch.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/MSCommon/arch.py rename to scons/scons-local-2.5.0/SCons/Tool/MSCommon/arch.py index 804721521..f7d28daf4 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/arch.py +++ b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/arch.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Module to define supported Windows chip architectures. """ diff --git a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/common.py b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/common.py similarity index 89% rename from scons/scons-local-2.4.1/SCons/Tool/MSCommon/common.py rename to scons/scons-local-2.5.0/SCons/Tool/MSCommon/common.py index a7bc4070e..59296c229 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/common.py +++ b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/common.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/MSCommon/common.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/MSCommon/common.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """ Common helper functions for working with the Microsoft tool chain. @@ -93,7 +93,7 @@ def has_reg(value): try: SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, value) ret = True - except WindowsError: + except SCons.Util.WinError: ret = False return ret @@ -180,7 +180,7 @@ def get_output(vcbat, args = None, env = None): stdout = popen.stdout.read() stderr = popen.stderr.read() - # Extra debug logic, uncomment if necessar + # Extra debug logic, uncomment if necessary # debug('get_output():stdout:%s'%stdout) # debug('get_output():stderr:%s'%stderr) @@ -226,33 +226,6 @@ def parse_output(output, keep = ("INCLUDE", "LIB", "LIBPATH", "PATH")): return dkeep -# TODO(sgk): unused -def output_to_dict(output): - """Given an output string, parse it to find env variables. - - Return a dict where keys are variables names, and values their content""" - envlinem = re.compile(r'^([a-zA-z0-9]+)=([\S\s]*)$') - parsedenv = {} - for line in output.splitlines(): - m = envlinem.match(line) - if m: - parsedenv[m.group(1)] = m.group(2) - return parsedenv - -# TODO(sgk): unused -def get_new(l1, l2): - """Given two list l1 and l2, return the items in l2 which are not in l1. - Order is maintained.""" - - # We don't try to be smart: lists are small, and this is not the bottleneck - # is any case - new = [] - for i in l2: - if i not in l1: - new.append(i) - - return new - # Local Variables: # tab-width:4 # indent-tabs-mode:nil diff --git a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/netframework.py b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/netframework.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/MSCommon/netframework.py rename to scons/scons-local-2.5.0/SCons/Tool/MSCommon/netframework.py index 6062e1178..935a8a5e8 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/netframework.py +++ b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/netframework.py @@ -1,5 +1,5 @@ # -# 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 @@ -20,13 +20,14 @@ # 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/MSCommon/netframework.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """ """ import os import re +import SCons.Util from common import read_reg, debug @@ -40,7 +41,7 @@ def find_framework_root(): try: froot = read_reg(_FRAMEWORKDIR_HKEY_ROOT) debug("Found framework install root in registry: %s" % froot) - except WindowsError, e: + except SCons.Util.WinError, e: debug("Could not read reg key %s" % _FRAMEWORKDIR_HKEY_ROOT) return None diff --git a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/sdk.py b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/sdk.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/MSCommon/sdk.py rename to scons/scons-local-2.5.0/SCons/Tool/MSCommon/sdk.py index 1b605b967..601f4f8f4 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/sdk.py +++ b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/sdk.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Module to detect the Platform/Windows SDK @@ -80,7 +80,7 @@ class SDKDefinition(object): try: sdk_dir = common.read_reg(hkey) - except WindowsError, e: + except SCons.Util.WinError, e: debug('find_sdk_dir(): no SDK registry key %s' % repr(hkey)) return None @@ -168,7 +168,7 @@ SDK70VCSetupScripts = { 'x86' : r'bin\vcvars32.bat', # # The first SDK found in the list is the one used by default if there # are multiple SDKs installed. Barring good reasons to the contrary, -# this means we should list SDKs with from most recent to oldest. +# this means we should list SDKs from most recent to oldest. # # If you update this list, update the documentation in Tool/mssdk.xml. SupportedSDKList = [ @@ -306,29 +306,6 @@ def set_sdk_by_directory(env, sdk_dir): for variable, directory in env_tuple_list: env.PrependENVPath(variable, directory) - -# TODO(sgk): currently unused; remove? -def get_cur_sdk_dir_from_reg(): - """Try to find the platform sdk directory from the registry. - - Return None if failed or the directory does not exist""" - if not SCons.Util.can_read_reg: - debug('SCons cannot read registry') - return None - - try: - val = common.read_reg(_CURINSTALLED_SDK_HKEY_ROOT) - debug("Found current sdk dir in registry: %s" % val) - except WindowsError, e: - debug("Did not find current sdk in registry") - return None - - if not os.path.exists(val): - debug("Current sdk dir %s not on fs" % val) - return None - - return val - def get_sdk_by_version(mssdk): if mssdk not in SupportedSDKMap: msg = "SDK version %s is not supported" % repr(mssdk) @@ -343,9 +320,6 @@ def get_default_sdk(): return None return InstalledSDKList[0] - - - def mssdk_setup_env(env): debug('sdk.py:mssdk_setup_env()') if 'MSSDK_DIR' in env: diff --git a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/vc.py b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/vc.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/MSCommon/vc.py rename to scons/scons-local-2.5.0/SCons/Tool/MSCommon/vc.py index 7f124082c..baf859afd 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/vc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/vc.py @@ -1,5 +1,5 @@ # -# 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 @@ # * test on 64 bits XP + VS 2005 (and VS 6 if possible) # * SDK # * Assembly -__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Module for Visual C/C++ detection and configuration. """ @@ -244,13 +244,13 @@ def find_vc_pdir(msvc_version): try: # ordinally at win64, try Wow6432Node first. comps = common.read_reg(root + 'Wow6432Node\\' + key, hkroot) - except WindowsError, e: + except SCons.Util.WinError, e: # at Microsoft Visual Studio for Python 2.7, value is not in Wow6432Node pass if not comps: # not Win64, or Microsoft Visual Studio for Python 2.7 comps = common.read_reg(root + key, hkroot) - except WindowsError, e: + except SCons.Util.WinError, e: debug('find_vc_dir(): no VC registry key %s' % repr(key)) else: debug('find_vc_dir(): found VC in registry: %s' % comps) diff --git a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/vs.py b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/vs.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/MSCommon/vs.py rename to scons/scons-local-2.5.0/SCons/Tool/MSCommon/vs.py index 86cd3a49b..82b989d82 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/MSCommon/vs.py +++ b/scons/scons-local-2.5.0/SCons/Tool/MSCommon/vs.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """Module to detect Visual Studio and/or Visual C/C++ """ @@ -52,8 +52,6 @@ class VisualStudio(object): self.__dict__.update(kw) self._cache = {} - # - def find_batch_file(self): vs_dir = self.get_vs_dir() if not vs_dir: @@ -85,7 +83,7 @@ class VisualStudio(object): key = root + key try: comps = read_reg(key) - except WindowsError, e: + except SCons.Util.WinError, e: debug('find_vs_dir_by_reg(): no VS registry key %s' % repr(key)) else: debug('find_vs_dir_by_reg(): found VS in registry: %s' % comps) @@ -116,8 +114,6 @@ class VisualStudio(object): return None return executable - # - def get_batch_file(self): try: return self._cache['batch_file'] @@ -471,7 +467,7 @@ def get_default_version(env): """Returns the default version string to use for MSVS. If no version was requested by the user through the MSVS environment - variable, query all the available the visual studios through + variable, query all the available visual studios through get_installed_visual_studios, and take the highest one. Return diff --git a/scons/scons-local-2.4.1/SCons/Tool/Perforce.py b/scons/scons-local-2.5.0/SCons/Tool/Perforce.py similarity index 90% rename from scons/scons-local-2.4.1/SCons/Tool/Perforce.py rename to scons/scons-local-2.5.0/SCons/Tool/Perforce.py index 409c7bea8..47d609658 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/Perforce.py +++ b/scons/scons-local-2.5.0/SCons/Tool/Perforce.py @@ -8,7 +8,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 @@ -29,7 +29,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/Perforce.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/Perforce.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os @@ -38,9 +38,6 @@ import SCons.Builder import SCons.Node.FS import SCons.Util -# This function should maybe be moved to SCons.Util? -from SCons.Tool.PharLapCommon import addPathIfNotExists - # Variables that we want to import from the base OS environment. _import_env = [ 'P4PORT', 'P4CLIENT', 'P4USER', 'USER', 'USERNAME', 'P4PASSWD', @@ -58,7 +55,6 @@ def generate(env): W.warn(W.DeprecatedSourceCodeWarning, """The Perforce() factory is deprecated and there is no replacement.""") return SCons.Builder.Builder(action = PerforceAction, env = env) - #setattr(env, 'Perforce', PerforceFactory) env.Perforce = PerforceFactory env['P4'] = 'p4' @@ -87,7 +83,7 @@ def generate(env): k=SCons.Util.RegOpenKeyEx(SCons.Util.hkey_mod.HKEY_LOCAL_MACHINE, 'Software\\Perforce\\environment') val, tok = SCons.Util.RegQueryValueEx(k, 'P4INSTROOT') - addPathIfNotExists(environ, 'PATH', val) + SCons.Util.AddPathIfNotExists(environ, 'PATH', val) except SCons.Util.RegError: # Can't detect where Perforce is, hope the user has it set in the # PATH. diff --git a/scons/scons-local-2.4.1/SCons/Tool/PharLapCommon.py b/scons/scons-local-2.5.0/SCons/Tool/PharLapCommon.py similarity index 72% rename from scons/scons-local-2.4.1/SCons/Tool/PharLapCommon.py rename to scons/scons-local-2.5.0/SCons/Tool/PharLapCommon.py index 46acb2ceb..863d2080f 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/PharLapCommon.py +++ b/scons/scons-local-2.5.0/SCons/Tool/PharLapCommon.py @@ -7,7 +7,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and """ # -# 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 @@ -29,7 +29,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/PharLapCommon.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/PharLapCommon.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import os.path @@ -85,28 +85,6 @@ def getPharLapVersion(): # Default return for Phar Lap 9.1 return 910 -def addPathIfNotExists(env_dict, key, path, sep=os.pathsep): - """This function will take 'key' out of the dictionary - 'env_dict', then add the path 'path' to that key if it is not - already there. This treats the value of env_dict[key] as if it - has a similar format to the PATH variable...a list of paths - separated by tokens. The 'path' will get added to the list if it - is not already there.""" - try: - is_list = 1 - paths = env_dict[key] - if not SCons.Util.is_List(env_dict[key]): - paths = paths.split(sep) - is_list = 0 - if os.path.normcase(path) not in list(map(os.path.normcase, paths)): - paths = [ path ] + paths - if is_list: - env_dict[key] = paths - else: - env_dict[key] = sep.join(paths) - except KeyError: - env_dict[key] = path - def addPharLapPaths(env): """This function adds the path to the Phar Lap binaries, includes, and libraries, if they are not already there.""" @@ -117,14 +95,14 @@ def addPharLapPaths(env): except KeyError: env_dict = {} env['ENV'] = env_dict - addPathIfNotExists(env_dict, 'PATH', - os.path.join(ph_path, 'bin')) - addPathIfNotExists(env_dict, 'INCLUDE', - os.path.join(ph_path, 'include')) - addPathIfNotExists(env_dict, 'LIB', - os.path.join(ph_path, 'lib')) - addPathIfNotExists(env_dict, 'LIB', - os.path.join(ph_path, os.path.normpath('lib/vclib'))) + SCons.Util.AddPathIfNotExists(env_dict, 'PATH', + os.path.join(ph_path, 'bin')) + SCons.Util.AddPathIfNotExists(env_dict, 'INCLUDE', + os.path.join(ph_path, 'include')) + SCons.Util.AddPathIfNotExists(env_dict, 'LIB', + os.path.join(ph_path, 'lib')) + SCons.Util.AddPathIfNotExists(env_dict, 'LIB', + os.path.join(ph_path, os.path.normpath('lib/vclib'))) env['PHARLAP_PATH'] = getPharLapPath() env['PHARLAP_VERSION'] = str(getPharLapVersion()) diff --git a/scons/scons-local-2.4.1/SCons/Tool/RCS.py b/scons/scons-local-2.5.0/SCons/Tool/RCS.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/RCS.py rename to scons/scons-local-2.5.0/SCons/Tool/RCS.py index 177e8285d..29dec38d8 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/RCS.py +++ b/scons/scons-local-2.5.0/SCons/Tool/RCS.py @@ -8,7 +8,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 @@ -29,7 +29,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/RCS.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/RCS.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Builder @@ -46,7 +46,6 @@ def generate(env): act = SCons.Action.Action('$RCS_COCOM', '$RCS_COCOMSTR') return SCons.Builder.Builder(action = act, env = env) - #setattr(env, 'RCS', RCSFactory) env.RCS = RCSFactory env['RCS'] = 'rcs' diff --git a/scons/scons-local-2.4.1/SCons/Tool/SCCS.py b/scons/scons-local-2.5.0/SCons/Tool/SCCS.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/SCCS.py rename to scons/scons-local-2.5.0/SCons/Tool/SCCS.py index 772c8897e..faf10b550 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/SCCS.py +++ b/scons/scons-local-2.5.0/SCons/Tool/SCCS.py @@ -8,7 +8,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 @@ -29,7 +29,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/SCCS.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/SCCS.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Builder @@ -46,7 +46,6 @@ def generate(env): act = SCons.Action.Action('$SCCSCOM', '$SCCSCOMSTR') return SCons.Builder.Builder(action = act, env = env) - #setattr(env, 'SCCS', SCCSFactory) env.SCCS = SCCSFactory env['SCCS'] = 'sccs' diff --git a/scons/scons-local-2.4.1/SCons/Tool/Subversion.py b/scons/scons-local-2.5.0/SCons/Tool/Subversion.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/Subversion.py rename to scons/scons-local-2.5.0/SCons/Tool/Subversion.py index cfcf7e77f..f1f10df26 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/Subversion.py +++ b/scons/scons-local-2.5.0/SCons/Tool/Subversion.py @@ -8,7 +8,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 @@ -29,7 +29,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/Subversion.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/Subversion.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path @@ -54,7 +54,6 @@ def generate(env): SVNREPOSITORY = repos, SVNMODULE = module) - #setattr(env, 'Subversion', SubversionFactory) env.Subversion = SubversionFactory env['SVN'] = 'svn' diff --git a/scons/scons-local-2.4.1/SCons/Tool/__init__.py b/scons/scons-local-2.5.0/SCons/Tool/__init__.py similarity index 99% rename from scons/scons-local-2.4.1/SCons/Tool/__init__.py rename to scons/scons-local-2.5.0/SCons/Tool/__init__.py index ac2413459..0207292d7 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/__init__.py +++ b/scons/scons-local-2.5.0/SCons/Tool/__init__.py @@ -14,7 +14,7 @@ tool definition. """ # -# 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 @@ -35,7 +35,7 @@ tool definition. # 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/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import imp import sys @@ -51,6 +51,7 @@ import SCons.Scanner.C import SCons.Scanner.D import SCons.Scanner.LaTeX import SCons.Scanner.Prog +import SCons.Scanner.SWIG DefaultToolpath=[] @@ -60,6 +61,7 @@ LaTeXScanner = SCons.Scanner.LaTeX.LaTeXScanner() PDFLaTeXScanner = SCons.Scanner.LaTeX.PDFLaTeXScanner() ProgramScanner = SCons.Scanner.Prog.ProgramScanner() SourceFileScanner = SCons.Scanner.Base({}, name='SourceFileScanner') +SWIGScanner = SCons.Scanner.SWIG.SWIGScanner() CSuffixes = [".c", ".C", ".cxx", ".cpp", ".c++", ".cc", ".h", ".H", ".hxx", ".hpp", ".hh", @@ -73,12 +75,17 @@ IDLSuffixes = [".idl", ".IDL"] LaTeXSuffixes = [".tex", ".ltx", ".latex"] +SWIGSuffixes = ['.i'] + for suffix in CSuffixes: SourceFileScanner.add_scanner(suffix, CScanner) for suffix in DSuffixes: SourceFileScanner.add_scanner(suffix, DScanner) +for suffix in SWIGSuffixes: + SourceFileScanner.add_scanner(suffix, SWIGScanner) + # FIXME: what should be done here? Two scanners scan the same extensions, # but look for different files, e.g., "picture.eps" vs. "picture.pdf". # The builders for DVI and PDF explicitly reference their scanners @@ -101,7 +108,7 @@ class Tool(object): self.options = module.options def _tool_module(self): - # TODO: Interchange zipimport with normal initilization for better error reporting + # TODO: Interchange zipimport with normal initialization for better error reporting oldpythonpath = sys.path sys.path = self.toolpath + sys.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/aixc++.py b/scons/scons-local-2.5.0/SCons/Tool/aixc++.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/aixc++.py rename to scons/scons-local-2.5.0/SCons/Tool/aixc++.py index a3fa10216..699dacb8d 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/aixc++.py +++ b/scons/scons-local-2.5.0/SCons/Tool/aixc++.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/aixc++.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/aixc++.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/aixcc.py b/scons/scons-local-2.5.0/SCons/Tool/aixcc.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/aixcc.py rename to scons/scons-local-2.5.0/SCons/Tool/aixcc.py index 8c7d71bb0..30735c96a 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/aixcc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/aixcc.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/aixcc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/aixcc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/aixf77.py b/scons/scons-local-2.5.0/SCons/Tool/aixf77.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/aixf77.py rename to scons/scons-local-2.5.0/SCons/Tool/aixf77.py index 7603a4a53..f23c1cbd8 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/aixf77.py +++ b/scons/scons-local-2.5.0/SCons/Tool/aixf77.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/aixf77.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/aixf77.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path @@ -41,7 +41,7 @@ import f77 # It would be good to look for the AIX F77 package the same way we're now # looking for the C and C++ packages. This should be as easy as supplying # the correct package names in the following list and uncommenting the -# SCons.Platform.aix_get_xlc() call the in the function below. +# SCons.Platform.aix_get_xlc() call in the function below. packages = [] def get_xlf77(env): diff --git a/scons/scons-local-2.4.1/SCons/Tool/aixlink.py b/scons/scons-local-2.5.0/SCons/Tool/aixlink.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/aixlink.py rename to scons/scons-local-2.5.0/SCons/Tool/aixlink.py index 2e6e65254..483068c4f 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/aixlink.py +++ b/scons/scons-local-2.5.0/SCons/Tool/aixlink.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/aixlink.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/aixlink.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/applelink.py b/scons/scons-local-2.5.0/SCons/Tool/applelink.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/applelink.py rename to scons/scons-local-2.5.0/SCons/Tool/applelink.py index e48689c2e..4e7a679d2 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/applelink.py +++ b/scons/scons-local-2.5.0/SCons/Tool/applelink.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/applelink.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/applelink.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/ar.py b/scons/scons-local-2.5.0/SCons/Tool/ar.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/ar.py rename to scons/scons-local-2.5.0/SCons/Tool/ar.py index ca0dc2429..a64ddfaee 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/ar.py +++ b/scons/scons-local-2.5.0/SCons/Tool/ar.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ar.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/ar.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/as.py b/scons/scons-local-2.5.0/SCons/Tool/as.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/as.py rename to scons/scons-local-2.5.0/SCons/Tool/as.py index 1b122d0f6..75992d59e 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/as.py +++ b/scons/scons-local-2.5.0/SCons/Tool/as.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/as.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/as.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/bcc32.py b/scons/scons-local-2.5.0/SCons/Tool/bcc32.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/bcc32.py rename to scons/scons-local-2.5.0/SCons/Tool/bcc32.py index 15e21222b..ffd29f263 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/bcc32.py +++ b/scons/scons-local-2.5.0/SCons/Tool/bcc32.py @@ -5,7 +5,7 @@ XXX """ # -# 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 @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/bcc32.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/bcc32.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/c++.py b/scons/scons-local-2.5.0/SCons/Tool/c++.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/c++.py rename to scons/scons-local-2.5.0/SCons/Tool/c++.py index 00630fe6f..b0c4e62e3 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/c++.py +++ b/scons/scons-local-2.5.0/SCons/Tool/c++.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/c++.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/c++.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/cc.py b/scons/scons-local-2.5.0/SCons/Tool/cc.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/cc.py rename to scons/scons-local-2.5.0/SCons/Tool/cc.py index c34dad2bb..b0a73f843 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/cc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/cc.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/cc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/cc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Tool import SCons.Defaults diff --git a/scons/scons-local-2.4.1/SCons/Tool/cvf.py b/scons/scons-local-2.5.0/SCons/Tool/cvf.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/cvf.py rename to scons/scons-local-2.5.0/SCons/Tool/cvf.py index 51c137fbe..06ea06378 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/cvf.py +++ b/scons/scons-local-2.5.0/SCons/Tool/cvf.py @@ -5,7 +5,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler. """ # -# 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 @@ -27,7 +27,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/cvf.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/cvf.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import fortran diff --git a/scons/scons-local-2.4.1/SCons/Tool/cyglink.py b/scons/scons-local-2.5.0/SCons/Tool/cyglink.py similarity index 99% rename from scons/scons-local-2.4.1/SCons/Tool/cyglink.py rename to scons/scons-local-2.5.0/SCons/Tool/cyglink.py index 5230910ae..921f0ebf4 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/cyglink.py +++ b/scons/scons-local-2.5.0/SCons/Tool/cyglink.py @@ -143,7 +143,7 @@ def _versioned_implib_name(env, libnode, version, prefix, suffix, **kw): implib_libtype=kw['libtype']) def _versioned_implib_symlinks(env, libnode, version, prefix, suffix, **kw): - """Generate link names that should be created for a versioned shared lirbrary. + """Generate link names that should be created for a versioned shared library. Returns a list in the form [ (link, linktarget), ... ] """ Verbose = False diff --git a/scons/scons-local-2.4.1/SCons/Tool/default.py b/scons/scons-local-2.5.0/SCons/Tool/default.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/default.py rename to scons/scons-local-2.5.0/SCons/Tool/default.py index 102121392..848e0b72c 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/default.py +++ b/scons/scons-local-2.5.0/SCons/Tool/default.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/default.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/default.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/dmd.py b/scons/scons-local-2.5.0/SCons/Tool/dmd.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Tool/dmd.py rename to scons/scons-local-2.5.0/SCons/Tool/dmd.py index c5561518e..a08421c10 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/dmd.py +++ b/scons/scons-local-2.5.0/SCons/Tool/dmd.py @@ -36,7 +36,7 @@ Lib tool variables: """ # -# 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 @@ -58,7 +58,7 @@ Lib tool variables: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dmd.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/dmd.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import subprocess diff --git a/scons/scons-local-2.4.1/SCons/Tool/docbook/__init__.py b/scons/scons-local-2.5.0/SCons/Tool/docbook/__init__.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/docbook/__init__.py rename to scons/scons-local-2.5.0/SCons/Tool/docbook/__init__.py index aead43c69..83b3ecd90 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/docbook/__init__.py +++ b/scons/scons-local-2.5.0/SCons/Tool/docbook/__init__.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001-7,2010 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 @@ -852,30 +852,16 @@ def generate(env): ) _detect(env) - try: - env.AddMethod(DocbookEpub, "DocbookEpub") - env.AddMethod(DocbookHtml, "DocbookHtml") - env.AddMethod(DocbookHtmlChunked, "DocbookHtmlChunked") - env.AddMethod(DocbookHtmlhelp, "DocbookHtmlhelp") - env.AddMethod(DocbookPdf, "DocbookPdf") - env.AddMethod(DocbookMan, "DocbookMan") - env.AddMethod(DocbookSlidesPdf, "DocbookSlidesPdf") - env.AddMethod(DocbookSlidesHtml, "DocbookSlidesHtml") - env.AddMethod(DocbookXInclude, "DocbookXInclude") - env.AddMethod(DocbookXslt, "DocbookXslt") - except AttributeError: - # Looks like we use a pre-0.98 version of SCons... - from SCons.Script.SConscript import SConsEnvironment - SConsEnvironment.DocbookEpub = DocbookEpub - SConsEnvironment.DocbookHtml = DocbookHtml - SConsEnvironment.DocbookHtmlChunked = DocbookHtmlChunked - SConsEnvironment.DocbookHtmlhelp = DocbookHtmlhelp - SConsEnvironment.DocbookPdf = DocbookPdf - SConsEnvironment.DocbookMan = DocbookMan - SConsEnvironment.DocbookSlidesPdf = DocbookSlidesPdf - SConsEnvironment.DocbookSlidesHtml = DocbookSlidesHtml - SConsEnvironment.DocbookXInclude = DocbookXInclude - SConsEnvironment.DocbookXslt = DocbookXslt + env.AddMethod(DocbookEpub, "DocbookEpub") + env.AddMethod(DocbookHtml, "DocbookHtml") + env.AddMethod(DocbookHtmlChunked, "DocbookHtmlChunked") + env.AddMethod(DocbookHtmlhelp, "DocbookHtmlhelp") + env.AddMethod(DocbookPdf, "DocbookPdf") + env.AddMethod(DocbookMan, "DocbookMan") + env.AddMethod(DocbookSlidesPdf, "DocbookSlidesPdf") + env.AddMethod(DocbookSlidesHtml, "DocbookSlidesHtml") + env.AddMethod(DocbookXInclude, "DocbookXInclude") + env.AddMethod(DocbookXslt, "DocbookXslt") def exists(env): diff --git a/scons/scons-local-2.4.1/SCons/Tool/dvi.py b/scons/scons-local-2.5.0/SCons/Tool/dvi.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/dvi.py rename to scons/scons-local-2.5.0/SCons/Tool/dvi.py index 9ad1beedf..cc3c8ca63 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/dvi.py +++ b/scons/scons-local-2.5.0/SCons/Tool/dvi.py @@ -5,7 +5,7 @@ Common DVI Builder definition for various other Tool modules that use it. """ # -# 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 @@ -27,7 +27,7 @@ Common DVI Builder definition for various other Tool modules that use it. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dvi.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/dvi.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Builder import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/dvipdf.py b/scons/scons-local-2.5.0/SCons/Tool/dvipdf.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/dvipdf.py rename to scons/scons-local-2.5.0/SCons/Tool/dvipdf.py index 9af25987b..d6a5dbbe6 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/dvipdf.py +++ b/scons/scons-local-2.5.0/SCons/Tool/dvipdf.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/dvipdf.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/dvipdf.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Defaults diff --git a/scons/scons-local-2.4.1/SCons/Tool/dvips.py b/scons/scons-local-2.5.0/SCons/Tool/dvips.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/dvips.py rename to scons/scons-local-2.5.0/SCons/Tool/dvips.py index 59a16f458..dcffa48c1 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/dvips.py +++ b/scons/scons-local-2.5.0/SCons/Tool/dvips.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dvips.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/dvips.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.4.1/SCons/Tool/f03.py b/scons/scons-local-2.5.0/SCons/Tool/f03.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/f03.py rename to scons/scons-local-2.5.0/SCons/Tool/f03.py index b84850a25..9e804d21e 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/f03.py +++ b/scons/scons-local-2.5.0/SCons/Tool/f03.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f03.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/f03.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/f77.py b/scons/scons-local-2.5.0/SCons/Tool/f77.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/f77.py rename to scons/scons-local-2.5.0/SCons/Tool/f77.py index b6c138a47..14cfc952d 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/f77.py +++ b/scons/scons-local-2.5.0/SCons/Tool/f77.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f77.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/f77.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Scanner.Fortran diff --git a/scons/scons-local-2.4.1/SCons/Tool/f90.py b/scons/scons-local-2.5.0/SCons/Tool/f90.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/f90.py rename to scons/scons-local-2.5.0/SCons/Tool/f90.py index 059f6390f..04ea509fc 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/f90.py +++ b/scons/scons-local-2.5.0/SCons/Tool/f90.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f90.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/f90.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Scanner.Fortran diff --git a/scons/scons-local-2.4.1/SCons/Tool/f95.py b/scons/scons-local-2.5.0/SCons/Tool/f95.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/f95.py rename to scons/scons-local-2.5.0/SCons/Tool/f95.py index dffbbda17..7398064a2 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/f95.py +++ b/scons/scons-local-2.5.0/SCons/Tool/f95.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f95.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/f95.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/filesystem.py b/scons/scons-local-2.5.0/SCons/Tool/filesystem.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/filesystem.py rename to scons/scons-local-2.5.0/SCons/Tool/filesystem.py index c9493e97b..8d11a4f93 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/filesystem.py +++ b/scons/scons-local-2.5.0/SCons/Tool/filesystem.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/filesystem.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/filesystem.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons from SCons.Tool.install import copyFunc diff --git a/scons/scons-local-2.4.1/SCons/Tool/fortran.py b/scons/scons-local-2.5.0/SCons/Tool/fortran.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/fortran.py rename to scons/scons-local-2.5.0/SCons/Tool/fortran.py index 43635d866..e536a84d5 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/fortran.py +++ b/scons/scons-local-2.5.0/SCons/Tool/fortran.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/fortran.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/fortran.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import re diff --git a/scons/scons-local-2.4.1/SCons/Tool/g++.py b/scons/scons-local-2.5.0/SCons/Tool/g++.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/g++.py rename to scons/scons-local-2.5.0/SCons/Tool/g++.py index f1a23f1bb..f66adc1c4 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/g++.py +++ b/scons/scons-local-2.5.0/SCons/Tool/g++.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/g++.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/g++.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path import re diff --git a/scons/scons-local-2.4.1/SCons/Tool/g77.py b/scons/scons-local-2.5.0/SCons/Tool/g77.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/g77.py rename to scons/scons-local-2.5.0/SCons/Tool/g77.py index 3e1af3c91..f685b01e4 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/g77.py +++ b/scons/scons-local-2.5.0/SCons/Tool/g77.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/g77.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/g77.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env diff --git a/scons/scons-local-2.4.1/SCons/Tool/gas.py b/scons/scons-local-2.5.0/SCons/Tool/gas.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/gas.py rename to scons/scons-local-2.5.0/SCons/Tool/gas.py index 373a336da..acebe5d1a 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/gas.py +++ b/scons/scons-local-2.5.0/SCons/Tool/gas.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gas.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/gas.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" as_module = __import__('as', globals(), locals(), []) diff --git a/scons/scons-local-2.4.1/SCons/Tool/gcc.py b/scons/scons-local-2.5.0/SCons/Tool/gcc.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/gcc.py rename to scons/scons-local-2.5.0/SCons/Tool/gcc.py index 06aba5860..e4032eaf4 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/gcc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/gcc.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gcc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/gcc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import cc import os diff --git a/scons/scons-local-2.4.1/SCons/Tool/gdc.py b/scons/scons-local-2.5.0/SCons/Tool/gdc.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Tool/gdc.py rename to scons/scons-local-2.5.0/SCons/Tool/gdc.py index e1d2c9c66..1c41858c9 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/gdc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/gdc.py @@ -24,7 +24,7 @@ Lib tool variables: """ # -# 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 @@ -46,7 +46,7 @@ Lib tool variables: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gdc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/gdc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Defaults diff --git a/scons/scons-local-2.4.1/SCons/Tool/gettext.py b/scons/scons-local-2.5.0/SCons/Tool/gettext.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/gettext.py rename to scons/scons-local-2.5.0/SCons/Tool/gettext.py index 43f88e948..99fbd3237 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/gettext.py +++ b/scons/scons-local-2.5.0/SCons/Tool/gettext.py @@ -2,7 +2,7 @@ """ -# 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 @@ -23,7 +23,7 @@ # 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/gettext.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/gettext.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" ############################################################################# def generate(env,**kw): diff --git a/scons/scons-local-2.4.1/SCons/Tool/gfortran.py b/scons/scons-local-2.5.0/SCons/Tool/gfortran.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/gfortran.py rename to scons/scons-local-2.5.0/SCons/Tool/gfortran.py index 0538cedb3..62f434ea9 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/gfortran.py +++ b/scons/scons-local-2.5.0/SCons/Tool/gfortran.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gfortran.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/gfortran.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/gnulink.py b/scons/scons-local-2.5.0/SCons/Tool/gnulink.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/gnulink.py rename to scons/scons-local-2.5.0/SCons/Tool/gnulink.py index 109330321..3df077ba3 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/gnulink.py +++ b/scons/scons-local-2.5.0/SCons/Tool/gnulink.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gnulink.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/gnulink.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util import SCons.Tool @@ -60,7 +60,7 @@ def generate(env): link._setup_versioned_lib_variables(env, tool = 'gnulink', use_soname = use_soname) env['LINKCALLBACKS'] = link._versioned_lib_callbacks() - # For backward-compatiblity with older SCons versions + # For backward-compatibility with older SCons versions env['SHLIBVERSIONFLAGS'] = SCons.Util.CLVar('-Wl,-Bsymbolic') def exists(env): diff --git a/scons/scons-local-2.4.1/SCons/Tool/gs.py b/scons/scons-local-2.5.0/SCons/Tool/gs.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/gs.py rename to scons/scons-local-2.5.0/SCons/Tool/gs.py index ddb22e680..b0874fda4 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/gs.py +++ b/scons/scons-local-2.5.0/SCons/Tool/gs.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gs.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/gs.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.4.1/SCons/Tool/hpc++.py b/scons/scons-local-2.5.0/SCons/Tool/hpc++.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/hpc++.py rename to scons/scons-local-2.5.0/SCons/Tool/hpc++.py index bd2b5f9ea..8e79af4e2 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/hpc++.py +++ b/scons/scons-local-2.5.0/SCons/Tool/hpc++.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/hpc++.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/hpc++.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/hpcc.py b/scons/scons-local-2.5.0/SCons/Tool/hpcc.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/hpcc.py rename to scons/scons-local-2.5.0/SCons/Tool/hpcc.py index 19c22d852..25835942e 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/hpcc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/hpcc.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/hpcc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/hpcc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/hplink.py b/scons/scons-local-2.5.0/SCons/Tool/hplink.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/hplink.py rename to scons/scons-local-2.5.0/SCons/Tool/hplink.py index 931f8cfb5..0b7777a41 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/hplink.py +++ b/scons/scons-local-2.5.0/SCons/Tool/hplink.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/hplink.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/hplink.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/icc.py b/scons/scons-local-2.5.0/SCons/Tool/icc.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/icc.py rename to scons/scons-local-2.5.0/SCons/Tool/icc.py index 3e639adf2..f6f071168 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/icc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/icc.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/icc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/icc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import cc diff --git a/scons/scons-local-2.4.1/SCons/Tool/icl.py b/scons/scons-local-2.5.0/SCons/Tool/icl.py similarity index 88% rename from scons/scons-local-2.4.1/SCons/Tool/icl.py rename to scons/scons-local-2.5.0/SCons/Tool/icl.py index bee5bcbcb..b14adf6dc 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/icl.py +++ b/scons/scons-local-2.5.0/SCons/Tool/icl.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 @@ -31,11 +31,11 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/icl.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/icl.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Tool.intelc -# This has been completely superceded by intelc.py, which can +# This has been completely superseded by intelc.py, which can # handle both Windows and Linux versions. def generate(*args, **kw): diff --git a/scons/scons-local-2.4.1/SCons/Tool/ifl.py b/scons/scons-local-2.5.0/SCons/Tool/ifl.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/ifl.py rename to scons/scons-local-2.5.0/SCons/Tool/ifl.py index 8c287fc98..e8b309108 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/ifl.py +++ b/scons/scons-local-2.5.0/SCons/Tool/ifl.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ifl.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/ifl.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults from SCons.Scanner.Fortran import FortranScan diff --git a/scons/scons-local-2.4.1/SCons/Tool/ifort.py b/scons/scons-local-2.5.0/SCons/Tool/ifort.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/ifort.py rename to scons/scons-local-2.5.0/SCons/Tool/ifort.py index 3400a8951..a00e2491d 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/ifort.py +++ b/scons/scons-local-2.5.0/SCons/Tool/ifort.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ifort.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/ifort.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults from SCons.Scanner.Fortran import FortranScan diff --git a/scons/scons-local-2.4.1/SCons/Tool/ilink.py b/scons/scons-local-2.5.0/SCons/Tool/ilink.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/ilink.py rename to scons/scons-local-2.5.0/SCons/Tool/ilink.py index e3828ca7c..4532d9b12 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/ilink.py +++ b/scons/scons-local-2.5.0/SCons/Tool/ilink.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ilink.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/ilink.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/ilink32.py b/scons/scons-local-2.5.0/SCons/Tool/ilink32.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/ilink32.py rename to scons/scons-local-2.5.0/SCons/Tool/ilink32.py index 7a63b36d6..a4ccff011 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/ilink32.py +++ b/scons/scons-local-2.5.0/SCons/Tool/ilink32.py @@ -5,7 +5,7 @@ XXX """ # -# 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 @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ilink32.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/ilink32.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Tool import SCons.Tool.bcc32 diff --git a/scons/scons-local-2.4.1/SCons/Tool/install.py b/scons/scons-local-2.5.0/SCons/Tool/install.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/install.py rename to scons/scons-local-2.5.0/SCons/Tool/install.py index 9ae78fa0a..f3e4227eb 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/install.py +++ b/scons/scons-local-2.5.0/SCons/Tool/install.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/install.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/install.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import re @@ -39,7 +39,7 @@ import stat import SCons.Action import SCons.Tool -from SCons.Util import make_path_relative +import SCons.Util # # We keep track of *all* installed files. @@ -91,7 +91,7 @@ def scons_copytree(src, dst, symlinks=False): errors.extend(err.args[0]) try: shutil.copystat(src, dst) - except WindowsError: + except SCons.Util.WinError: # can't copy file access times on Windows pass except OSError, why: @@ -225,7 +225,7 @@ def stringFunc(target, source, env): # Emitter functions # def add_targets_to_INSTALLED_FILES(target, source, env): - """ an emitter that adds all target files to the list stored in the + """ An emitter that adds all target files to the list stored in the _INSTALLED_FILES global variable. This way all installed files of one scons call will be collected. """ @@ -236,7 +236,7 @@ def add_targets_to_INSTALLED_FILES(target, source, env): return (target, source) def add_versioned_targets_to_INSTALLED_FILES(target, source, env): - """ an emitter that adds all target files to the list stored in the + """ An emitter that adds all target files to the list stored in the _INSTALLED_FILES global variable. This way all installed files of one scons call will be collected. """ @@ -254,7 +254,7 @@ def add_versioned_targets_to_INSTALLED_FILES(target, source, env): return (target, source) class DESTDIR_factory(object): - """ a node factory, where all files will be relative to the dir supplied + """ A node factory, where all files will be relative to the dir supplied in the constructor. """ def __init__(self, env, dir): @@ -262,11 +262,11 @@ class DESTDIR_factory(object): self.dir = env.arg2nodes( dir, env.fs.Dir )[0] def Entry(self, name): - name = make_path_relative(name) + name = SCons.Util.make_path_relative(name) return self.dir.Entry(name) def Dir(self, name): - name = make_path_relative(name) + name = SCons.Util.make_path_relative(name) return self.dir.Dir(name) # @@ -304,14 +304,12 @@ def InstallBuilderWrapper(env, target=None, source=None, dir=None, **kw): # '#' on the file name portion as meaning the Node should # be relative to the top-level SConstruct directory. target = env.fs.Entry('.'+os.sep+src.name, dnode) - #tgt.extend(BaseInstallBuilder(env, target, src, **kw)) tgt.extend(BaseInstallBuilder(env, target, src, **kw)) return tgt def InstallAsBuilderWrapper(env, target=None, source=None, **kw): result = [] for src, tgt in map(lambda x, y: (x, y), source, target): - #result.extend(BaseInstallBuilder(env, tgt, src, **kw)) result.extend(BaseInstallBuilder(env, tgt, src, **kw)) return result @@ -374,6 +372,7 @@ def generate(env): source_factory = env.fs.Entry, multi = 1, emitter = [ add_targets_to_INSTALLED_FILES, ], + source_scanner = SCons.Scanner.Base( {}, name = 'Install', recursive = False ), name = 'InstallBuilder') global BaseVersionedInstallBuilder diff --git a/scons/scons-local-2.4.1/SCons/Tool/intelc.py b/scons/scons-local-2.5.0/SCons/Tool/intelc.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/intelc.py rename to scons/scons-local-2.5.0/SCons/Tool/intelc.py index ebf25345a..24b1dc527 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/intelc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/intelc.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from __future__ import division -__revision__ = "src/engine/SCons/Tool/intelc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/intelc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import math, sys, os.path, glob, string, re @@ -62,15 +62,6 @@ class MissingDirError(IntelCError): # dir not found class NoRegistryModuleError(IntelCError): # can't read registry at all pass -def uniquify(s): - """Return a sequence containing only one copy of each unique element from input sequence s. - Does not preserve order. - Input sequence must be hashable (i.e. must be usable as a dictionary key).""" - u = {} - for x in s: - u[x] = 1 - return list(u.keys()) - def linux_ver_normalize(vstr): """Normalize a Linux compiler version number. Intel changed from "80" to "9.0" in 2005, so we assume if the number @@ -191,7 +182,7 @@ def get_intel_registry_value(valuename, version=None, abi=None): except SCons.Util.RegError: raise MissingRegistryError("%s was not found in the registry, for Intel compiler version %s, abi='%s'"%(K, version,abi)) - except WindowsError: + except SCons.Util.WinError: raise MissingRegistryError("%s was not found in the registry, for Intel compiler version %s, abi='%s'"%(K, version,abi)) # Get the value: @@ -215,7 +206,7 @@ def get_all_compiler_versions(): try: k = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, keyname) - except WindowsError: + except SCons.Util.WinError: # For version 13 or later, check for default instance UUID if is_win64: keyname = 'Software\\WoW6432Node\\Intel\\Suites' @@ -224,7 +215,7 @@ def get_all_compiler_versions(): try: k = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, keyname) - except WindowsError: + except SCons.Util.WinError: return [] i = 0 versions = [] @@ -298,11 +289,17 @@ def get_all_compiler_versions(): m = re.search(r'([0-9]{0,4})(?:_sp\d*)?\.([0-9][0-9.]*)$', d) if m: versions.append("%s.%s"%(m.group(1), m.group(2))) + for d in glob.glob('/opt/intel/compilers_and_libraries_*'): + # JPA: For the new version of Intel compiler 2016.1. + m = re.search(r'([0-9]{0,4})(?:_sp\d*)?\.([0-9][0-9.]*)$', d) + if m: + versions.append("%s.%s"%(m.group(1), m,group(2))) + def keyfunc(str): """Given a dot-separated version string, return a tuple of ints representing it.""" return [int(x) for x in str.split('.')] # split into ints, sort, then remove dups - return sorted(uniquify(versions), key=keyfunc, reverse=True) + return sorted(SCons.Util.unique(versions), key=keyfunc, reverse=True) def get_intel_compiler_top(version, abi): """ @@ -379,7 +376,16 @@ def get_intel_compiler_top(version, abi): top = d break return top - top = find_in_2011style_dir(version) or find_in_2010style_dir(version) or find_in_2008style_dir(version) + def find_in_2016style_dir(version): + # The 2016 (compiler v16) dirs are inconsistent from previous. + top = None + for d in glob.glob('/opt/intel/compilers_and_libraries_%s/linux'%version): + if os.path.exists(os.path.join(d, "bin", "ia32", "icc")) or os.path.exists(os.path.join(d, "bin", "intel64", "icc")): + top = d + break + return top + + top = find_in_2016style_dir(version) or find_in_2011style_dir(version) or find_in_2010style_dir(version) or find_in_2008style_dir(version) # print "INTELC: top=",top if not top: raise MissingDirError("Can't find version %s Intel compiler in %s (abi='%s')"%(version,top, abi)) diff --git a/scons/scons-local-2.4.1/SCons/Tool/ipkg.py b/scons/scons-local-2.5.0/SCons/Tool/ipkg.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/ipkg.py rename to scons/scons-local-2.5.0/SCons/Tool/ipkg.py index b7f16740a..474f762d9 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/ipkg.py +++ b/scons/scons-local-2.5.0/SCons/Tool/ipkg.py @@ -11,7 +11,7 @@ packages fake_root. """ # -# 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 @@ -33,7 +33,7 @@ packages fake_root. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ipkg.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/ipkg.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os diff --git a/scons/scons-local-2.4.1/SCons/Tool/jar.py b/scons/scons-local-2.5.0/SCons/Tool/jar.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/jar.py rename to scons/scons-local-2.5.0/SCons/Tool/jar.py index 885720974..eed1bc627 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/jar.py +++ b/scons/scons-local-2.5.0/SCons/Tool/jar.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/jar.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/jar.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Subst import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/javac.py b/scons/scons-local-2.5.0/SCons/Tool/javac.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/javac.py rename to scons/scons-local-2.5.0/SCons/Tool/javac.py index bbaa47d77..51dd199bd 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/javac.py +++ b/scons/scons-local-2.5.0/SCons/Tool/javac.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/javac.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/javac.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/javah.py b/scons/scons-local-2.5.0/SCons/Tool/javah.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/javah.py rename to scons/scons-local-2.5.0/SCons/Tool/javah.py index 4c20393b0..c16077288 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/javah.py +++ b/scons/scons-local-2.5.0/SCons/Tool/javah.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/javah.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/javah.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/latex.py b/scons/scons-local-2.5.0/SCons/Tool/latex.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/latex.py rename to scons/scons-local-2.5.0/SCons/Tool/latex.py index e329d3f2c..6ed84c6ed 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/latex.py +++ b/scons/scons-local-2.5.0/SCons/Tool/latex.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/latex.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/latex.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Defaults diff --git a/scons/scons-local-2.4.1/SCons/Tool/ldc.py b/scons/scons-local-2.5.0/SCons/Tool/ldc.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Tool/ldc.py rename to scons/scons-local-2.5.0/SCons/Tool/ldc.py index b37f2d72f..663df3836 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/ldc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/ldc.py @@ -24,7 +24,7 @@ Lib tool variables: """ # -# 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 @@ -46,7 +46,7 @@ Lib tool variables: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ldc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/ldc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import subprocess diff --git a/scons/scons-local-2.4.1/SCons/Tool/lex.py b/scons/scons-local-2.5.0/SCons/Tool/lex.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/lex.py rename to scons/scons-local-2.5.0/SCons/Tool/lex.py index 9baecb574..d0ac82db0 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/lex.py +++ b/scons/scons-local-2.5.0/SCons/Tool/lex.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/lex.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/lex.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/link.py b/scons/scons-local-2.5.0/SCons/Tool/link.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/link.py rename to scons/scons-local-2.5.0/SCons/Tool/link.py index 08dce9942..7a883a574 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/link.py +++ b/scons/scons-local-2.5.0/SCons/Tool/link.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/link.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/link.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import sys import re diff --git a/scons/scons-local-2.4.1/SCons/Tool/linkloc.py b/scons/scons-local-2.5.0/SCons/Tool/linkloc.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/linkloc.py rename to scons/scons-local-2.5.0/SCons/Tool/linkloc.py index a8415b893..9fbc59935 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/linkloc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/linkloc.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/linkloc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/linkloc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path import re diff --git a/scons/scons-local-2.4.1/SCons/Tool/m4.py b/scons/scons-local-2.5.0/SCons/Tool/m4.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/m4.py rename to scons/scons-local-2.5.0/SCons/Tool/m4.py index de9c3f649..7fd4a2fa7 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/m4.py +++ b/scons/scons-local-2.5.0/SCons/Tool/m4.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/m4.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/m4.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.4.1/SCons/Tool/masm.py b/scons/scons-local-2.5.0/SCons/Tool/masm.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/masm.py rename to scons/scons-local-2.5.0/SCons/Tool/masm.py index 3e00d3340..bc1f83e31 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/masm.py +++ b/scons/scons-local-2.5.0/SCons/Tool/masm.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/masm.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/masm.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/midl.py b/scons/scons-local-2.5.0/SCons/Tool/midl.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/midl.py rename to scons/scons-local-2.5.0/SCons/Tool/midl.py index a46c1eb95..27ab01aee 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/midl.py +++ b/scons/scons-local-2.5.0/SCons/Tool/midl.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/midl.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/midl.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.4.1/SCons/Tool/mingw.py b/scons/scons-local-2.5.0/SCons/Tool/mingw.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Tool/mingw.py rename to scons/scons-local-2.5.0/SCons/Tool/mingw.py index 0afd55935..182fd7447 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/mingw.py +++ b/scons/scons-local-2.5.0/SCons/Tool/mingw.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mingw.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/mingw.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/msgfmt.py b/scons/scons-local-2.5.0/SCons/Tool/msgfmt.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/msgfmt.py rename to scons/scons-local-2.5.0/SCons/Tool/msgfmt.py index 9904f1168..12b750405 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/msgfmt.py +++ b/scons/scons-local-2.5.0/SCons/Tool/msgfmt.py @@ -1,6 +1,6 @@ """ msgfmt tool """ -# 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 @@ -21,7 +21,7 @@ # 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/msgfmt.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/msgfmt.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" from SCons.Builder import BuilderBase ############################################################################# diff --git a/scons/scons-local-2.4.1/SCons/Tool/msginit.py b/scons/scons-local-2.5.0/SCons/Tool/msginit.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/msginit.py rename to scons/scons-local-2.5.0/SCons/Tool/msginit.py index 7afd804a3..0f5950b15 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/msginit.py +++ b/scons/scons-local-2.5.0/SCons/Tool/msginit.py @@ -3,7 +3,7 @@ Tool specific initialization of msginit tool. """ -# 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 @@ -24,7 +24,7 @@ Tool specific initialization of msginit tool. # 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/msginit.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/msginit.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Warnings import SCons.Builder diff --git a/scons/scons-local-2.4.1/SCons/Tool/msgmerge.py b/scons/scons-local-2.5.0/SCons/Tool/msgmerge.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/msgmerge.py rename to scons/scons-local-2.5.0/SCons/Tool/msgmerge.py index a1b4b73fe..3473597da 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/msgmerge.py +++ b/scons/scons-local-2.5.0/SCons/Tool/msgmerge.py @@ -3,7 +3,7 @@ Tool specific initialization for `msgmerge` tool. """ -# 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 @@ -24,7 +24,7 @@ Tool specific initialization for `msgmerge` tool. # 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/msgmerge.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/msgmerge.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" ############################################################################# def _update_or_init_po_files(target, source, env): diff --git a/scons/scons-local-2.4.1/SCons/Tool/mslib.py b/scons/scons-local-2.5.0/SCons/Tool/mslib.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/mslib.py rename to scons/scons-local-2.5.0/SCons/Tool/mslib.py index c4f1b0e5b..70c164334 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/mslib.py +++ b/scons/scons-local-2.5.0/SCons/Tool/mslib.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mslib.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/mslib.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/mslink.py b/scons/scons-local-2.5.0/SCons/Tool/mslink.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/mslink.py rename to scons/scons-local-2.5.0/SCons/Tool/mslink.py index ce561fa17..27745d16a 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/mslink.py +++ b/scons/scons-local-2.5.0/SCons/Tool/mslink.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mslink.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/mslink.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path @@ -305,7 +305,7 @@ def generate(env): # if the manifest actually exists before trying to run mt with it. env['MTEXECOM'] = '-$MT $MTFLAGS -manifest ${TARGET}.manifest $_MANIFEST_SOURCES -outputresource:$TARGET;1' env['MTSHLIBCOM'] = '-$MT $MTFLAGS -manifest ${TARGET}.manifest $_MANIFEST_SOURCES -outputresource:$TARGET;2' - # Future work garyo 27-Feb-11 + # TODO Future work garyo 27-Feb-11 env['_MANIFEST_SOURCES'] = None # _windowsManifestSources # Set-up ms tools paths diff --git a/scons/scons-local-2.4.1/SCons/Tool/mssdk.py b/scons/scons-local-2.5.0/SCons/Tool/mssdk.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/mssdk.py rename to scons/scons-local-2.5.0/SCons/Tool/mssdk.py index 66bf75d66..1dddbe770 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/mssdk.py +++ b/scons/scons-local-2.5.0/SCons/Tool/mssdk.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mssdk.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/mssdk.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" """engine.SCons.Tool.mssdk diff --git a/scons/scons-local-2.4.1/SCons/Tool/msvc.py b/scons/scons-local-2.5.0/SCons/Tool/msvc.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/msvc.py rename to scons/scons-local-2.5.0/SCons/Tool/msvc.py index bf4de4578..f60bf3404 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/msvc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/msvc.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/msvc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/msvc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path import re diff --git a/scons/scons-local-2.4.1/SCons/Tool/msvs.py b/scons/scons-local-2.5.0/SCons/Tool/msvs.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Tool/msvs.py rename to scons/scons-local-2.5.0/SCons/Tool/msvs.py index d47a93956..df80edf34 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/msvs.py +++ b/scons/scons-local-2.5.0/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() diff --git a/scons/scons-local-2.4.1/SCons/Tool/mwcc.py b/scons/scons-local-2.5.0/SCons/Tool/mwcc.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Tool/mwcc.py rename to scons/scons-local-2.5.0/SCons/Tool/mwcc.py index 31d815ef8..2694a46d9 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/mwcc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/mwcc.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mwcc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/mwcc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/mwld.py b/scons/scons-local-2.5.0/SCons/Tool/mwld.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/mwld.py rename to scons/scons-local-2.5.0/SCons/Tool/mwld.py index 434f26036..e187273f4 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/mwld.py +++ b/scons/scons-local-2.5.0/SCons/Tool/mwld.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mwld.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/mwld.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/nasm.py b/scons/scons-local-2.5.0/SCons/Tool/nasm.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/nasm.py rename to scons/scons-local-2.5.0/SCons/Tool/nasm.py index 663e91897..5c8ff4ca2 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/nasm.py +++ b/scons/scons-local-2.5.0/SCons/Tool/nasm.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/nasm.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/nasm.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/packaging/__init__.py b/scons/scons-local-2.5.0/SCons/Tool/packaging/__init__.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/packaging/__init__.py rename to scons/scons-local-2.5.0/SCons/Tool/packaging/__init__.py index d0a8dca05..78bc679f5 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/packaging/__init__.py +++ b/scons/scons-local-2.5.0/SCons/Tool/packaging/__init__.py @@ -4,7 +4,7 @@ SCons Packaging Tool. """ # -# 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 @@ -25,7 +25,7 @@ SCons Packaging Tool. # 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/packaging/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Environment from SCons.Variables import * @@ -77,7 +77,6 @@ def Tag(env, target, source, *more_tags, **kw_tags): # differentiate between "normal" object attributes and the # packaging attributes. As the user should not be bothered with # that, the prefix will be added here if missing. - #if not k.startswith('PACKAGING_'): if k[:10] != 'PACKAGING_': k='PACKAGING_'+k t.Tag(k, v) @@ -175,7 +174,7 @@ def Package(env, target=None, source=None, **kw): args=[x for x in args if x not in kw] if len(args)==0: - raise # must be a different error, so reraise + raise # must be a different error, so re-raise elif len(args)==1: raise SCons.Errors.UserError( "Missing Packagetag '%s' for %s packager"\ % (args[0],packager.__name__) ) @@ -232,8 +231,6 @@ def options(opts): def copy_attr(f1, f2): """ copies the special packaging file attributes from f1 to f2. """ - #pattrs = [x for x in dir(f1) if not hasattr(f2, x) and\ - # x.startswith('PACKAGING_')] copyit = lambda x: not hasattr(f2, x) and x[:10] == 'PACKAGING_' if f1._tags: pattrs = list(filter(copyit, f1._tags)) @@ -278,7 +275,7 @@ def putintopackageroot(target, source, env, pkgroot, honor_install_location=1): return (target, new_source) def stripinstallbuilder(target, source, env): - """ strips the install builder action from the source list and stores + """ Strips the install builder action from the source list and stores the final installation location as the "PACKAGING_INSTALL_LOCATION" of the source of the source file. This effectively removes the final installed files from the source list while remembering the installation location. diff --git a/scons/scons-local-2.4.1/SCons/Tool/packaging/ipk.py b/scons/scons-local-2.5.0/SCons/Tool/packaging/ipk.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/packaging/ipk.py rename to scons/scons-local-2.5.0/SCons/Tool/packaging/ipk.py index ae4d7fc83..fbf3c2b1e 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/packaging/ipk.py +++ b/scons/scons-local-2.5.0/SCons/Tool/packaging/ipk.py @@ -2,7 +2,7 @@ """ # -# 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 @@ -24,7 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/ipk.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/ipk.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Builder import SCons.Node.FS @@ -35,7 +35,7 @@ from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION, SUMMARY, X_IPK_PRIORITY, X_IPK_SECTION, SOURCE_URL, X_IPK_MAINTAINER, X_IPK_DEPENDS, **kw): - """ this function prepares the packageroot directory for packaging with the + """ This function prepares the packageroot directory for packaging with the ipkg builder. """ SCons.Tool.Tool('ipkg').generate(env) @@ -45,7 +45,7 @@ def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION, target, source = stripinstallbuilder(target, source, env) target, source = putintopackageroot(target, source, env, PACKAGEROOT) - # This should be overridable from the construction environment, + # This should be overrideable from the construction environment, # which it is by using ARCHITECTURE=. # Guessing based on what os.uname() returns at least allows it # to work for both i386 and x86_64 Linux systems. @@ -61,7 +61,7 @@ def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION, if 'ARCHITECTURE' in kw: buildarchitecture = kw['ARCHITECTURE'] - # setup the kw to contain the mandatory arguments to this fucntion. + # setup the kw to contain the mandatory arguments to this function. # do this before calling any builder or setup function loc=locals() del loc['kw'] @@ -104,7 +104,7 @@ def gen_ipk_dir(proot, source, env, kw): return proot def build_specfiles(source, target, env): - """ filter the targets for the needed files and use the variables in env + """ Filter the targets for the needed files and use the variables in env to create the specfile. """ # diff --git a/scons/scons-local-2.4.1/SCons/Tool/packaging/msi.py b/scons/scons-local-2.5.0/SCons/Tool/packaging/msi.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/packaging/msi.py rename to scons/scons-local-2.5.0/SCons/Tool/packaging/msi.py index cc563b832..29095e811 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/packaging/msi.py +++ b/scons/scons-local-2.5.0/SCons/Tool/packaging/msi.py @@ -4,7 +4,7 @@ The msi packager. """ # -# 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 @@ -25,7 +25,7 @@ The msi packager. # 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/packaging/msi.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/msi.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import SCons @@ -70,7 +70,7 @@ def convert_to_id(s, id_set): try: return id_set[id][s] except KeyError: - # no we did not so initialize with the id + # no we did not, so initialize with the id if id not in id_set: id_set[id] = { s : id } # there is a collision, generate an id which is unique by appending # the collision number @@ -79,7 +79,7 @@ def convert_to_id(s, id_set): return id_set[id][s] def is_dos_short_file_name(file): - """ examine if the given file is in the 8.3 form. + """ Examine if the given file is in the 8.3 form. """ fname, ext = os.path.splitext(file) proper_ext = len(ext) == 0 or (2 <= len(ext) <= 4) # the ext contains the dot @@ -88,7 +88,7 @@ def is_dos_short_file_name(file): return proper_ext and proper_fname def gen_dos_short_file_name(file, filename_set): - """ see http://support.microsoft.com/default.aspx?scid=kb;en-us;Q142982 + """ See http://support.microsoft.com/default.aspx?scid=kb;en-us;Q142982 These are no complete 8.3 dos short names. The ~ char is missing and replaced with one character from the filename. WiX warns about such @@ -186,7 +186,7 @@ def string_wxsfile(target, source, env): return "building WiX file %s"%( target[0].path ) def build_wxsfile(target, source, env): - """ compiles a .wxs file from the keywords given in env['msi_spec'] and + """ Compiles a .wxs file from the keywords given in env['msi_spec'] and by analyzing the tree of source nodes and their tags. """ file = open(target[0].get_abspath(), 'w') @@ -268,7 +268,7 @@ def create_default_directory_layout(root, NAME, VERSION, VENDOR, filename_set): # mandatory and optional file tags # def build_wxsfile_file_section(root, files, NAME, VERSION, VENDOR, filename_set, id_set): - """ builds the Component sections of the wxs file with their included files. + """ Builds the Component sections of the wxs file with their included files. Files need to be specified in 8.3 format and in the long name format, long filenames will be converted automatically. @@ -280,7 +280,7 @@ def build_wxsfile_file_section(root, files, NAME, VERSION, VENDOR, filename_set, factory = Document() def get_directory( node, dir ): - """ returns the node under the given node representing the directory. + """ Returns the node under the given node representing the directory. Returns the component node if dir is None or empty. """ @@ -415,7 +415,7 @@ def build_wxsfile_features_section(root, files, NAME, VERSION, SUMMARY, id_set): root.getElementsByTagName('Product')[0].childNodes.append(Feature) def build_wxsfile_default_gui(root): - """ this function adds a default GUI to the wxs file + """ This function adds a default GUI to the wxs file """ factory = Document() Product = root.getElementsByTagName('Product')[0] @@ -429,7 +429,7 @@ def build_wxsfile_default_gui(root): Product.childNodes.append(UIRef) def build_license_file(directory, spec): - """ creates a License.rtf file with the content of "X_MSI_LICENSE_TEXT" + """ Creates a License.rtf file with the content of "X_MSI_LICENSE_TEXT" in the given directory """ name, text = '', '' diff --git a/scons/scons-local-2.4.1/SCons/Tool/packaging/rpm.py b/scons/scons-local-2.5.0/SCons/Tool/packaging/rpm.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/packaging/rpm.py rename to scons/scons-local-2.5.0/SCons/Tool/packaging/rpm.py index cf3ea8193..6c00e8c5d 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/packaging/rpm.py +++ b/scons/scons-local-2.5.0/SCons/Tool/packaging/rpm.py @@ -4,7 +4,7 @@ The rpm packager. """ # -# 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 @@ -25,7 +25,7 @@ The rpm packager. # 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/packaging/rpm.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/rpm.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os @@ -72,7 +72,6 @@ def package(env, target, source, PACKAGEROOT, NAME, VERSION, # if no "SOURCE_URL" tag is given add a default one. if 'SOURCE_URL' not in kw: - #kw['SOURCE_URL']=(str(target[0])+".tar.gz").replace('.rpm', '') kw['SOURCE_URL']=(str(target[0])+".tar.gz").replace('.rpm', '') # mangle the source and target list for the rpmbuild @@ -86,26 +85,21 @@ def package(env, target, source, PACKAGEROOT, NAME, VERSION, def collectintargz(target, source, env): """ Puts all source files into a tar.gz file. """ - # the rpm tool depends on a source package, until this is chagned + # the rpm tool depends on a source package, until this is changed # this hack needs to be here that tries to pack all sources in. sources = env.FindSourceFiles() # filter out the target we are building the source list for. - #sources = [s for s in sources if not (s in target)] sources = [s for s in sources if s not in target] # find the .spec file for rpm and add it since it is not necessarily found # by the FindSourceFiles function. - #sources.extend( [s for s in source if str(s).rfind('.spec')!=-1] ) - spec_file = lambda s: str(s).rfind('.spec') != -1 - sources.extend( list(filter(spec_file, source)) ) + sources.extend( [s for s in source if str(s).rfind('.spec')!=-1] ) # as the source contains the url of the source package this rpm package # is built from, we extract the target name - #tarball = (str(target[0])+".tar.gz").replace('.rpm', '') tarball = (str(target[0])+".tar.gz").replace('.rpm', '') try: - #tarball = env['SOURCE_URL'].split('/')[-1] tarball = env['SOURCE_URL'].split('/')[-1] except KeyError, e: raise SCons.Errors.UserError( "Missing PackageTag '%s' for RPM packager" % e.args[0] ) @@ -194,7 +188,7 @@ def build_specfile_sections(spec): return str def build_specfile_header(spec): - """ Builds all section but the %file of a rpm specfile + """ Builds all sections but the %file of a rpm specfile """ str = "" @@ -312,11 +306,10 @@ class SimpleTagCompiler(object): self.mandatory = mandatory def compile(self, values): - """ compiles the tagset and returns a str containing the result + """ Compiles the tagset and returns a str containing the result """ def is_international(tag): - #return tag.endswith('_') - return tag[-1:] == '_' + return tag.endswith('_') def get_country_code(tag): return tag[-2:] @@ -327,7 +320,6 @@ class SimpleTagCompiler(object): replacements = list(self.tagset.items()) str = "" - #domestic = [ (k,v) for k,v in replacements if not is_international(k) ] domestic = [t for t in replacements if not is_international(t[0])] for key, replacement in domestic: try: @@ -336,11 +328,9 @@ class SimpleTagCompiler(object): if self.mandatory: raise e - #international = [ (k,v) for k,v in replacements if is_international(k) ] international = [t for t in replacements if is_international(t[0])] for key, replacement in international: try: - #int_values_for_key = [ (get_country_code(k),v) for k,v in values.items() if strip_country_code(k) == key ] x = [t for t in values.items() if strip_country_code(t[0]) == key] int_values_for_key = [(get_country_code(t[0]),t[1]) for t in x] for v in int_values_for_key: diff --git a/scons/scons-local-2.4.1/SCons/Tool/packaging/src_tarbz2.py b/scons/scons-local-2.5.0/SCons/Tool/packaging/src_tarbz2.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/packaging/src_tarbz2.py rename to scons/scons-local-2.5.0/SCons/Tool/packaging/src_tarbz2.py index 6314e6438..b72f42e5d 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/packaging/src_tarbz2.py +++ b/scons/scons-local-2.5.0/SCons/Tool/packaging/src_tarbz2.py @@ -4,7 +4,7 @@ The tarbz2 SRC packager. """ # -# 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 @@ -26,7 +26,7 @@ The tarbz2 SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" from SCons.Tool.packaging import putintopackageroot diff --git a/scons/scons-local-2.4.1/SCons/Tool/packaging/src_targz.py b/scons/scons-local-2.5.0/SCons/Tool/packaging/src_targz.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/packaging/src_targz.py rename to scons/scons-local-2.5.0/SCons/Tool/packaging/src_targz.py index 7431fb79c..c8e91ec89 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/packaging/src_targz.py +++ b/scons/scons-local-2.5.0/SCons/Tool/packaging/src_targz.py @@ -4,7 +4,7 @@ The targz SRC packager. """ # -# 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 @@ -26,7 +26,7 @@ The targz SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" from SCons.Tool.packaging import putintopackageroot diff --git a/scons/scons-local-2.4.1/SCons/Tool/packaging/src_zip.py b/scons/scons-local-2.5.0/SCons/Tool/packaging/src_zip.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/packaging/src_zip.py rename to scons/scons-local-2.5.0/SCons/Tool/packaging/src_zip.py index 99f8c06ae..41d5e45b1 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/packaging/src_zip.py +++ b/scons/scons-local-2.5.0/SCons/Tool/packaging/src_zip.py @@ -4,7 +4,7 @@ The zip SRC packager. """ # -# 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 @@ -26,7 +26,7 @@ The zip SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" from SCons.Tool.packaging import putintopackageroot diff --git a/scons/scons-local-2.4.1/SCons/Tool/packaging/tarbz2.py b/scons/scons-local-2.5.0/SCons/Tool/packaging/tarbz2.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/packaging/tarbz2.py rename to scons/scons-local-2.5.0/SCons/Tool/packaging/tarbz2.py index 02568d5b3..a98c6e811 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/packaging/tarbz2.py +++ b/scons/scons-local-2.5.0/SCons/Tool/packaging/tarbz2.py @@ -4,7 +4,7 @@ The tarbz2 SRC packager. """ # -# 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 @@ -26,7 +26,7 @@ The tarbz2 SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/scons/scons-local-2.4.1/SCons/Tool/packaging/targz.py b/scons/scons-local-2.5.0/SCons/Tool/packaging/targz.py similarity index 90% rename from scons/scons-local-2.4.1/SCons/Tool/packaging/targz.py rename to scons/scons-local-2.5.0/SCons/Tool/packaging/targz.py index 09b17268b..d0c80dbfe 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/packaging/targz.py +++ b/scons/scons-local-2.5.0/SCons/Tool/packaging/targz.py @@ -4,7 +4,7 @@ The targz SRC packager. """ # -# 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 @@ -26,7 +26,7 @@ The targz SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/targz.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/targz.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/scons/scons-local-2.4.1/SCons/Tool/packaging/zip.py b/scons/scons-local-2.5.0/SCons/Tool/packaging/zip.py similarity index 90% rename from scons/scons-local-2.4.1/SCons/Tool/packaging/zip.py rename to scons/scons-local-2.5.0/SCons/Tool/packaging/zip.py index bc263fb3d..0709ff162 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/packaging/zip.py +++ b/scons/scons-local-2.5.0/SCons/Tool/packaging/zip.py @@ -4,7 +4,7 @@ The zip SRC packager. """ # -# 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 @@ -26,7 +26,7 @@ The zip SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/zip.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/zip.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/scons/scons-local-2.4.1/SCons/Tool/pdf.py b/scons/scons-local-2.5.0/SCons/Tool/pdf.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/pdf.py rename to scons/scons-local-2.5.0/SCons/Tool/pdf.py index b2d378e54..9475bda15 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/pdf.py +++ b/scons/scons-local-2.5.0/SCons/Tool/pdf.py @@ -6,7 +6,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf """ # -# 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 @@ -28,7 +28,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/pdf.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/pdf.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Builder import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/pdflatex.py b/scons/scons-local-2.5.0/SCons/Tool/pdflatex.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/pdflatex.py rename to scons/scons-local-2.5.0/SCons/Tool/pdflatex.py index f4cb4ae5a..9f8973691 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/pdflatex.py +++ b/scons/scons-local-2.5.0/SCons/Tool/pdflatex.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/pdflatex.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/pdflatex.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/pdftex.py b/scons/scons-local-2.5.0/SCons/Tool/pdftex.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/pdftex.py rename to scons/scons-local-2.5.0/SCons/Tool/pdftex.py index 84adf475d..815dc83bd 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/pdftex.py +++ b/scons/scons-local-2.5.0/SCons/Tool/pdftex.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/pdftex.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/pdftex.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import SCons.Action diff --git a/scons/scons-local-2.4.1/SCons/Tool/qt.py b/scons/scons-local-2.5.0/SCons/Tool/qt.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/qt.py rename to scons/scons-local-2.5.0/SCons/Tool/qt.py index 923f719ef..4feb38eaa 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/qt.py +++ b/scons/scons-local-2.5.0/SCons/Tool/qt.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/qt.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/qt.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path import re diff --git a/scons/scons-local-2.4.1/SCons/Tool/rmic.py b/scons/scons-local-2.5.0/SCons/Tool/rmic.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/rmic.py rename to scons/scons-local-2.5.0/SCons/Tool/rmic.py index dbacda302..c05286db8 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/rmic.py +++ b/scons/scons-local-2.5.0/SCons/Tool/rmic.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/rmic.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/rmic.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/rpcgen.py b/scons/scons-local-2.5.0/SCons/Tool/rpcgen.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/rpcgen.py rename to scons/scons-local-2.5.0/SCons/Tool/rpcgen.py index eec6bf625..6c4116f5b 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/rpcgen.py +++ b/scons/scons-local-2.5.0/SCons/Tool/rpcgen.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/rpcgen.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/rpcgen.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" from SCons.Builder import Builder import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/rpm.py b/scons/scons-local-2.5.0/SCons/Tool/rpm.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/rpm.py rename to scons/scons-local-2.5.0/SCons/Tool/rpm.py index 400639e95..fe63e2941 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/rpm.py +++ b/scons/scons-local-2.5.0/SCons/Tool/rpm.py @@ -11,7 +11,7 @@ tar.gz consisting of the source file and a specfile. """ # -# 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 @@ -33,7 +33,7 @@ tar.gz consisting of the source file and a specfile. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/rpm.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/rpm.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import re diff --git a/scons/scons-local-2.4.1/SCons/Tool/rpmutils.py b/scons/scons-local-2.5.0/SCons/Tool/rpmutils.py similarity index 99% rename from scons/scons-local-2.4.1/SCons/Tool/rpmutils.py rename to scons/scons-local-2.5.0/SCons/Tool/rpmutils.py index 82247bc68..aa6c6804b 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/rpmutils.py +++ b/scons/scons-local-2.5.0/SCons/Tool/rpmutils.py @@ -14,7 +14,7 @@ exact syntax. """ -# 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 @@ -35,7 +35,7 @@ exact syntax. # 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/rpmutils.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/rpmutils.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import platform diff --git a/scons/scons-local-2.4.1/SCons/Tool/sgiar.py b/scons/scons-local-2.5.0/SCons/Tool/sgiar.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/sgiar.py rename to scons/scons-local-2.5.0/SCons/Tool/sgiar.py index 1e7a4bd1d..849520c9b 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/sgiar.py +++ b/scons/scons-local-2.5.0/SCons/Tool/sgiar.py @@ -11,7 +11,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 @@ -33,7 +33,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgiar.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/sgiar.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/sgic++.py b/scons/scons-local-2.5.0/SCons/Tool/sgic++.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/sgic++.py rename to scons/scons-local-2.5.0/SCons/Tool/sgic++.py index 556009a43..ec1954ec7 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/sgic++.py +++ b/scons/scons-local-2.5.0/SCons/Tool/sgic++.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgic++.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/sgic++.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/sgicc.py b/scons/scons-local-2.5.0/SCons/Tool/sgicc.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/sgicc.py rename to scons/scons-local-2.5.0/SCons/Tool/sgicc.py index f236b786c..474e6cdca 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/sgicc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/sgicc.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgicc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/sgicc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import cc diff --git a/scons/scons-local-2.4.1/SCons/Tool/sgilink.py b/scons/scons-local-2.5.0/SCons/Tool/sgilink.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/sgilink.py rename to scons/scons-local-2.5.0/SCons/Tool/sgilink.py index b0249d249..491d293ff 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/sgilink.py +++ b/scons/scons-local-2.5.0/SCons/Tool/sgilink.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgilink.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/sgilink.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/sunar.py b/scons/scons-local-2.5.0/SCons/Tool/sunar.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/sunar.py rename to scons/scons-local-2.5.0/SCons/Tool/sunar.py index 6f7fe70c5..e453a7bbc 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/sunar.py +++ b/scons/scons-local-2.5.0/SCons/Tool/sunar.py @@ -2,7 +2,7 @@ Tool-specific initialization for Solaris (Forte) ar (library archive). If CC exists, static libraries should be built with it, so that template -instantians can be resolved. +instantiations can be resolved. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunar.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/sunar.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.4.1/SCons/Tool/sunc++.py b/scons/scons-local-2.5.0/SCons/Tool/sunc++.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Tool/sunc++.py rename to scons/scons-local-2.5.0/SCons/Tool/sunc++.py index 8dc4d23b1..cf0c95dc5 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/sunc++.py +++ b/scons/scons-local-2.5.0/SCons/Tool/sunc++.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunc++.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/sunc++.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons diff --git a/scons/scons-local-2.4.1/SCons/Tool/suncc.py b/scons/scons-local-2.5.0/SCons/Tool/suncc.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/suncc.py rename to scons/scons-local-2.5.0/SCons/Tool/suncc.py index b40a8d736..0110174e4 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/suncc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/suncc.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/suncc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/suncc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/sunf77.py b/scons/scons-local-2.5.0/SCons/Tool/sunf77.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/sunf77.py rename to scons/scons-local-2.5.0/SCons/Tool/sunf77.py index a169c4fde..e3260c9e6 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/sunf77.py +++ b/scons/scons-local-2.5.0/SCons/Tool/sunf77.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunf77.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/sunf77.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/sunf90.py b/scons/scons-local-2.5.0/SCons/Tool/sunf90.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/sunf90.py rename to scons/scons-local-2.5.0/SCons/Tool/sunf90.py index bb737f78d..63465e2f5 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/sunf90.py +++ b/scons/scons-local-2.5.0/SCons/Tool/sunf90.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunf90.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/sunf90.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/sunf95.py b/scons/scons-local-2.5.0/SCons/Tool/sunf95.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Tool/sunf95.py rename to scons/scons-local-2.5.0/SCons/Tool/sunf95.py index 52cbaa886..61bdf3742 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/sunf95.py +++ b/scons/scons-local-2.5.0/SCons/Tool/sunf95.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunf95.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/sunf95.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Util diff --git a/scons/scons-local-2.4.1/SCons/Tool/sunlink.py b/scons/scons-local-2.5.0/SCons/Tool/sunlink.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/sunlink.py rename to scons/scons-local-2.5.0/SCons/Tool/sunlink.py index 90f95bd9f..49deaf163 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/sunlink.py +++ b/scons/scons-local-2.5.0/SCons/Tool/sunlink.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunlink.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/sunlink.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import os.path diff --git a/scons/scons-local-2.4.1/SCons/Tool/swig.py b/scons/scons-local-2.5.0/SCons/Tool/swig.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Tool/swig.py rename to scons/scons-local-2.5.0/SCons/Tool/swig.py index 74c5a8ee5..1d806ae6f 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/swig.py +++ b/scons/scons-local-2.5.0/SCons/Tool/swig.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/swig.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/swig.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path import re @@ -39,11 +39,12 @@ import subprocess import SCons.Action import SCons.Defaults -import SCons.Scanner import SCons.Tool import SCons.Util import SCons.Node +verbose = False + swigs = [ 'swig', 'swig3.0', 'swig2.0' ] SwigAction = SCons.Action.Action('$SWIGCOM', '$SWIGCOMSTR') @@ -140,9 +141,12 @@ def _get_swig_version(env, swig): if pipe.wait() != 0: return out = pipe.stdout.read() - match = re.search(r'SWIG Version\s+(\S+)$', out, re.MULTILINE) + match = re.search(r'SWIG Version\s+(\S+).*', out, re.MULTILINE) if match: + if verbose: print "Version is:%s"%match.group(1) return match.group(1) + else: + if verbose: print "Unable to detect version: [%s]"%out def generate(env): """Add Builders and construction variables for swig to an Environment.""" @@ -177,11 +181,6 @@ def generate(env): env['_SWIGINCFLAGS'] = '$( ${_concat(SWIGINCPREFIX, SWIGPATH, SWIGINCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)' env['SWIGCOM'] = '$SWIG -o $TARGET ${_SWIGOUTDIR} ${_SWIGINCFLAGS} $SWIGFLAGS $SOURCES' - expr = '^[ \t]*%[ \t]*(?:include|import|extern)[ \t]*(<|"?)([^>\s"]+)(?:>|"?)' - scanner = SCons.Scanner.ClassicCPP("SWIGScan", ".i", "SWIGPATH", expr) - - env.Append(SCANNERS = scanner) - def exists(env): swig = env.get('SWIG') or env.Detect(['swig']) return swig diff --git a/scons/scons-local-2.4.1/SCons/Tool/tar.py b/scons/scons-local-2.5.0/SCons/Tool/tar.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Tool/tar.py rename to scons/scons-local-2.5.0/SCons/Tool/tar.py index e96743866..c19d4916a 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/tar.py +++ b/scons/scons-local-2.5.0/SCons/Tool/tar.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/tar.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/tar.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.4.1/SCons/Tool/tex.py b/scons/scons-local-2.5.0/SCons/Tool/tex.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/Tool/tex.py rename to scons/scons-local-2.5.0/SCons/Tool/tex.py index 92542d606..b4e457f64 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/tex.py +++ b/scons/scons-local-2.5.0/SCons/Tool/tex.py @@ -10,7 +10,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 @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/tex.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/tex.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path import re @@ -700,12 +700,6 @@ def tex_emitter_core(target, source, env, graphics_extensions): content = source[0].get_text_contents() - # These variables are no longer used. - #idx_exists = os.path.isfile(targetbase + '.idx') - #nlo_exists = os.path.isfile(targetbase + '.nlo') - #glo_exists = os.path.isfile(targetbase + '.glo') - #acr_exists = os.path.isfile(targetbase + '.acn') - # set up list with the regular expressions # we use to find features used file_tests_search = [auxfile_re, diff --git a/scons/scons-local-2.4.1/SCons/Tool/textfile.py b/scons/scons-local-2.5.0/SCons/Tool/textfile.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/textfile.py rename to scons/scons-local-2.5.0/SCons/Tool/textfile.py index 87a3ad8f2..f0d028f92 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/textfile.py +++ b/scons/scons-local-2.5.0/SCons/Tool/textfile.py @@ -1,6 +1,6 @@ # -*- python -*- # -# 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 @@ -40,11 +40,11 @@ Textfile/Substfile builder for SCons. expanded (its keys are not expanded). If a value of SUBST_DICT is a python callable function, it is called and the result is expanded as the value. Values are substituted in a "random" order; if any - substitution could be further expanded by another subsitition, it - is unpredictible whether the expansion will occur. + substitution could be further expanded by another substitution, it + is unpredictable whether the expansion will occur. """ -__revision__ = "src/engine/SCons/Tool/textfile.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/textfile.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons diff --git a/scons/scons-local-2.4.1/SCons/Tool/tlib.py b/scons/scons-local-2.5.0/SCons/Tool/tlib.py similarity index 91% rename from scons/scons-local-2.4.1/SCons/Tool/tlib.py rename to scons/scons-local-2.5.0/SCons/Tool/tlib.py index 4951bddfe..406697f3c 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/tlib.py +++ b/scons/scons-local-2.5.0/SCons/Tool/tlib.py @@ -5,7 +5,7 @@ XXX """ # -# 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 @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/tlib.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/tlib.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Tool import SCons.Tool.bcc32 diff --git a/scons/scons-local-2.4.1/SCons/Tool/wix.py b/scons/scons-local-2.5.0/SCons/Tool/wix.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/wix.py rename to scons/scons-local-2.5.0/SCons/Tool/wix.py index 0fa3ea7e9..cc259edc1 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/wix.py +++ b/scons/scons-local-2.5.0/SCons/Tool/wix.py @@ -8,7 +8,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. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/wix.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/wix.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import SCons.Builder import SCons.Action diff --git a/scons/scons-local-2.4.1/SCons/Tool/xgettext.py b/scons/scons-local-2.5.0/SCons/Tool/xgettext.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Tool/xgettext.py rename to scons/scons-local-2.5.0/SCons/Tool/xgettext.py index 4edd4aa80..153d71f74 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/xgettext.py +++ b/scons/scons-local-2.5.0/SCons/Tool/xgettext.py @@ -3,7 +3,7 @@ Tool specific initialization of `xgettext` tool. """ -# 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 @@ -24,7 +24,7 @@ Tool specific initialization of `xgettext` tool. # 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/xgettext.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/xgettext.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" ############################################################################# class _CmdRunner(object): @@ -76,7 +76,7 @@ def _update_pot_file(target, source, env): nop = lambda target, source, env : 0 # Save scons cwd and os cwd (NOTE: they may be different. After the job, we - # revert ech one to its original state). + # revert each one to its original state). save_cwd = env.fs.getcwd() save_os_cwd = os.getcwd() chdir = target[0].dir @@ -134,7 +134,7 @@ def _update_pot_file(target, source, env): explain = "new file" if needs_update: # Print message employing SCons.Action.Action for that. - msg = "Writting " + repr(str(target[0])) + " (" + explain + ")" + msg = "Writing " + repr(str(target[0])) + " (" + explain + ")" env.Execute(SCons.Action.Action(nop, msg)) f = open(str(target[0]),"w") f.write(new_content) @@ -142,7 +142,7 @@ def _update_pot_file(target, source, env): return 0 else: # Print message employing SCons.Action.Action for that. - msg = "Not writting " + repr(str(target[0])) + " (" + explain + ")" + msg = "Not writing " + repr(str(target[0])) + " (" + explain + ")" env.Execute(SCons.Action.Action(nop, msg)) return 0 ############################################################################# diff --git a/scons/scons-local-2.4.1/SCons/Tool/yacc.py b/scons/scons-local-2.5.0/SCons/Tool/yacc.py similarity index 87% rename from scons/scons-local-2.4.1/SCons/Tool/yacc.py rename to scons/scons-local-2.5.0/SCons/Tool/yacc.py index c05140f0f..6a089a147 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/yacc.py +++ b/scons/scons-local-2.5.0/SCons/Tool/yacc.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/yacc.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/yacc.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path @@ -61,7 +61,7 @@ def _yaccEmitter(target, source, env, ysuf, hsuf): base, ext = os.path.splitext(SCons.Util.to_String(source[0])) target.append(base + env.subst("$YACCVCGFILESUFFIX")) - # If -v is specirfied yacc will create the output debug file + # If -v is specified yacc will create the output debug file # which is not really source for any process, but should # be noted and also be cleaned # Bug #2558 @@ -118,14 +118,6 @@ def generate(env): env['YACCCOM'] = '$YACC $YACCFLAGS -o $TARGET $SOURCES' env['YACCHFILESUFFIX'] = '.h' - # Apparently, OS X now creates file.hpp like everybody else - # I have no idea when it changed; it was fixed in 10.4 - #if env['PLATFORM'] == 'darwin': - # # Bison on Mac OS X just appends ".h" to the generated target .cc - # # or .cpp file name. Hooray for delayed expansion of variables. - # env['YACCHXXFILESUFFIX'] = '${TARGET.suffix}.h' - #else: - # env['YACCHXXFILESUFFIX'] = '.hpp' env['YACCHXXFILESUFFIX'] = '.hpp' env['YACCVCGFILESUFFIX'] = '.vcg' diff --git a/scons/scons-local-2.4.1/SCons/Tool/zip.py b/scons/scons-local-2.5.0/SCons/Tool/zip.py similarity index 95% rename from scons/scons-local-2.4.1/SCons/Tool/zip.py rename to scons/scons-local-2.5.0/SCons/Tool/zip.py index 02999c2d4..5349cba33 100644 --- a/scons/scons-local-2.4.1/SCons/Tool/zip.py +++ b/scons/scons-local-2.5.0/SCons/Tool/zip.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 @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/zip.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Tool/zip.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path diff --git a/scons/scons-local-2.4.1/SCons/Util.py b/scons/scons-local-2.5.0/SCons/Util.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Util.py rename to scons/scons-local-2.5.0/SCons/Util.py index be86831df..21ef53fed 100644 --- a/scons/scons-local-2.4.1/SCons/Util.py +++ b/scons/scons-local-2.5.0/SCons/Util.py @@ -3,7 +3,7 @@ Various utility functions go here. """ # -# 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 @@ -24,7 +24,7 @@ Various utility functions go here. # 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/Util.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Util.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import sys @@ -92,7 +92,7 @@ def splitext(path): def updrive(path): """ Make the drive letter (if any) upper case. - This is useful because Windows is inconsitent on the case + This is useful because Windows is inconsistent on the case of the drive letter, which can cause inconsistencies when calculating command signatures. """ @@ -167,7 +167,7 @@ class DisplayEngine(object): def set_mode(self, mode): self.print_it = mode -def render_tree(root, child_func, prune=0, margin=[0], visited={}): +def render_tree(root, child_func, prune=0, margin=[0], visited=None): """ Render a tree of nodes into an ASCII tree view. root - the root node of the tree @@ -181,6 +181,10 @@ def render_tree(root, child_func, prune=0, margin=[0], visited={}): rname = str(root) + # Initialize 'visited' dict, if required + if visited is None: + visited = {} + children = child_func(root) retval = "" for pipe in margin[:-1]: @@ -207,7 +211,7 @@ def render_tree(root, child_func, prune=0, margin=[0], visited={}): IDX = lambda N: N and 1 or 0 -def print_tree(root, child_func, prune=0, showtags=0, margin=[0], visited={}): +def print_tree(root, child_func, prune=0, showtags=0, margin=[0], visited=None): """ Print a tree of nodes. This is like render_tree, except it prints lines directly instead of creating a string representation in memory, @@ -224,6 +228,10 @@ def print_tree(root, child_func, prune=0, showtags=0, margin=[0], visited={}): """ rname = str(root) + + # Initialize 'visited' dict, if required + if visited is None: + visited = {} if showtags: @@ -291,7 +299,7 @@ def print_tree(root, child_func, prune=0, showtags=0, margin=[0], visited={}): # often too slow. # We are using the following trick to speed up these -# functions. Default arguments are used to take a snapshot of the +# functions. Default arguments are used to take a snapshot of # the global functions and constants used by these functions. This # transforms accesses to global variable into local variables # accesses (i.e. LOAD_FAST instead of LOAD_GLOBAL). @@ -301,11 +309,11 @@ ListTypes = (list, UserList) SequenceTypes = (list, tuple, UserList) # Note that profiling data shows a speed-up when comparing -# explicitely with str and unicode instead of simply comparing +# explicitly with str and unicode instead of simply comparing # with basestring. (at least on Python 2.5.1) StringTypes = (str, unicode, UserString) -# Empirically, it is faster to check explicitely for str and +# Empirically, it is faster to check explicitly for str and # unicode than for basestring. BaseStringTypes = (str, unicode) @@ -326,11 +334,11 @@ def is_String(obj, isinstance=isinstance, StringTypes=StringTypes): def is_Scalar(obj, isinstance=isinstance, StringTypes=StringTypes, SequenceTypes=SequenceTypes): # Profiling shows that there is an impressive speed-up of 2x - # when explicitely checking for strings instead of just not + # when explicitly checking for strings instead of just not # sequence when the argument (i.e. obj) is already a string. # But, if obj is a not string then it is twice as fast to # check only for 'not sequence'. The following code therefore - # assumes that the obj argument is a string must of the time. + # assumes that the obj argument is a string most of the time. return isinstance(obj, StringTypes) or not isinstance(obj, SequenceTypes) def do_flatten(sequence, result, isinstance=isinstance, @@ -431,7 +439,7 @@ def to_String_for_signature(obj, to_String_for_subst=to_String_for_subst, # # A special case is any object that has a __semi_deepcopy__() method, # which we invoke to create the copy. Currently only used by -# BuilderDict to actually prevent the copy operation (as invalid on that object) +# BuilderDict to actually prevent the copy operation (as invalid on that object). # # The dispatch table approach used here is a direct rip-off from the # normal Python copy module. @@ -571,6 +579,19 @@ except ImportError: pass RegError = _NoError +WinError = None +# Make sure we have a definition of WindowsError so we can +# run platform-independent tests of Windows functionality on +# platforms other than Windows. (WindowsError is, in fact, an +# OSError subclass on Windows.) +class PlainWindowsError(OSError): + pass +try: + WinError = WindowsError +except NameError: + WinError = PlainWindowsError + + if can_read_reg: HKEY_CLASSES_ROOT = hkey_mod.HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE = hkey_mod.HKEY_LOCAL_MACHINE @@ -604,30 +625,16 @@ if can_read_reg: k = RegOpenKeyEx(root, keyp) return RegQueryValueEx(k,val) else: - try: - e = WindowsError - except NameError: - # Make sure we have a definition of WindowsError so we can - # run platform-independent tests of Windows functionality on - # platforms other than Windows. (WindowsError is, in fact, an - # OSError subclass on Windows.) - class WindowsError(OSError): - pass - import builtins - builtins.WindowsError = WindowsError - else: - del e - HKEY_CLASSES_ROOT = None HKEY_LOCAL_MACHINE = None HKEY_CURRENT_USER = None HKEY_USERS = None def RegGetValue(root, key): - raise WindowsError + raise WinError def RegOpenKeyEx(root, key): - raise WindowsError + raise WinError if sys.platform == 'win32': @@ -889,6 +896,28 @@ def AppendPath(oldpath, newpath, sep = os.pathsep, else: return sep.join(paths) +def AddPathIfNotExists(env_dict, key, path, sep=os.pathsep): + """This function will take 'key' out of the dictionary + 'env_dict', then add the path 'path' to that key if it is not + already there. This treats the value of env_dict[key] as if it + has a similar format to the PATH variable...a list of paths + separated by tokens. The 'path' will get added to the list if it + is not already there.""" + try: + is_list = 1 + paths = env_dict[key] + if not is_List(env_dict[key]): + paths = paths.split(sep) + is_list = 0 + if os.path.normcase(path) not in list(map(os.path.normcase, paths)): + paths = [ path ] + paths + if is_list: + env_dict[key] = paths + else: + env_dict[key] = sep.join(paths) + except KeyError: + env_dict[key] = path + if sys.platform == 'cygwin': def get_native_path(path): """Transforms an absolute path into a native path for the system. In @@ -1156,38 +1185,40 @@ def uniquer_hashables(seq): return result +# Recipe 19.11 "Reading Lines with Continuation Characters", +# by Alex Martelli, straight from the Python CookBook (2nd edition). +def logical_lines(physical_lines, joiner=''.join): + logical_line = [] + for line in physical_lines: + stripped = line.rstrip() + if stripped.endswith('\\'): + # a line which continues w/the next physical line + logical_line.append(stripped[:-1]) + else: + # a line which does not continue, end of logical line + logical_line.append(line) + yield joiner(logical_line) + logical_line = [] + if logical_line: + # end of sequence implies end of last logical line + yield joiner(logical_line) + -# Much of the logic here was originally based on recipe 4.9 from the -# Python CookBook, but we had to dumb it way down for Python 1.5.2. class LogicalLines(object): - + """ Wrapper class for the logical_lines method. + + Allows us to read all "logical" lines at once from a + given file object. + """ + def __init__(self, fileobj): self.fileobj = fileobj - def readline(self): - result = [] - while True: - line = self.fileobj.readline() - if not line: - break - if line[-2:] == '\\\n': - result.append(line[:-2]) - else: - result.append(line) - break - return ''.join(result) - def readlines(self): - result = [] - while True: - line = self.readline() - if not line: - break - result.append(line) + result = [l for l in logical_lines(self.fileobj)] return result - class UniqueList(UserList): def __init__(self, seq = []): UserList.__init__(self, seq) diff --git a/scons/scons-local-2.4.1/SCons/Variables/BoolVariable.py b/scons/scons-local-2.5.0/SCons/Variables/BoolVariable.py similarity index 93% rename from scons/scons-local-2.4.1/SCons/Variables/BoolVariable.py rename to scons/scons-local-2.5.0/SCons/Variables/BoolVariable.py index c7310a759..e6ad86bf8 100644 --- a/scons/scons-local-2.4.1/SCons/Variables/BoolVariable.py +++ b/scons/scons-local-2.5.0/SCons/Variables/BoolVariable.py @@ -12,7 +12,7 @@ Usage example: """ # -# 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 @@ -34,7 +34,7 @@ Usage example: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Variables/BoolVariable.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Variables/BoolVariable.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __all__ = ['BoolVariable',] @@ -51,7 +51,7 @@ def _text2bool(val): will be returned. See '__true_strings' and '__false_strings' for values considered - 'true' or 'false respectivly. + 'true' or 'false respectively. This is usable as 'converter' for SCons' Variables. """ @@ -74,7 +74,7 @@ def _validator(key, val, env): def BoolVariable(key, help, default): """ - The input parameters describe a boolen option, thus they are + The input parameters describe a boolean option, thus they are returned with the correct converter and validator appended. The 'help' text will by appended by '(yes|no) to show the valid valued. The result is usable for input to opts.Add(). diff --git a/scons/scons-local-2.4.1/SCons/Variables/EnumVariable.py b/scons/scons-local-2.5.0/SCons/Variables/EnumVariable.py similarity index 94% rename from scons/scons-local-2.4.1/SCons/Variables/EnumVariable.py rename to scons/scons-local-2.5.0/SCons/Variables/EnumVariable.py index 734d48c18..5fd41013d 100644 --- a/scons/scons-local-2.4.1/SCons/Variables/EnumVariable.py +++ b/scons/scons-local-2.5.0/SCons/Variables/EnumVariable.py @@ -15,7 +15,7 @@ Usage example: """ # -# 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 @@ -37,7 +37,7 @@ Usage example: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Variables/EnumVariable.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Variables/EnumVariable.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __all__ = ['EnumVariable',] @@ -52,7 +52,7 @@ def _validator(key, val, env, vals): def EnumVariable(key, help, default, allowed_values, map={}, ignorecase=0): """ - The input parameters describe a option with only certain values + The input parameters describe an option with only certain values allowed. They are returned with an appropriate converter and validator appended. The result is usable for input to Variables.Add(). @@ -65,7 +65,7 @@ def EnumVariable(key, help, default, allowed_values, map={}, ignorecase=0): for this option. The 'map'-dictionary may be used for converting the input value - into canonical values (eg. for aliases). + into canonical values (e.g. for aliases). 'ignorecase' defines the behaviour of the validator: diff --git a/scons/scons-local-2.4.1/SCons/Variables/ListVariable.py b/scons/scons-local-2.5.0/SCons/Variables/ListVariable.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Variables/ListVariable.py rename to scons/scons-local-2.5.0/SCons/Variables/ListVariable.py index 5541f303d..8e31d88e8 100644 --- a/scons/scons-local-2.4.1/SCons/Variables/ListVariable.py +++ b/scons/scons-local-2.5.0/SCons/Variables/ListVariable.py @@ -4,7 +4,7 @@ This file defines the option type for SCons implementing 'lists'. A 'list' option may either be 'all', 'none' or a list of names separated by comma. After the option has been processed, the option -value holds either the named list elements, all list elemens or no +value holds either the named list elements, all list elements or no list elements at all. Usage example: @@ -25,7 +25,7 @@ Usage example: """ # -# 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 @@ -46,9 +46,9 @@ Usage example: # 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/Variables/ListVariable.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Variables/ListVariable.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" -# Know Bug: This should behave like a Set-Type, but does not really, +# Known Bug: This should behave like a Set-Type, but does not really, # since elements can occur twice. __all__ = ['ListVariable',] @@ -106,14 +106,14 @@ def _converter(val, allowedElems, mapdict): ## def _validator(key, val, env): ## """ ## """ -## # todo: write validater for pgk list +## # todo: write validator for pgk list ## return 1 def ListVariable(key, help, default, names, map={}): """ The input parameters describe a 'package list' option, thus they - are returned with the correct converter and validater appended. The + are returned with the correct converter and validator appended. The result is usable for input to opts.Add() . A 'package list' option may either be 'all', 'none' or a list of diff --git a/scons/scons-local-2.4.1/SCons/Variables/PackageVariable.py b/scons/scons-local-2.5.0/SCons/Variables/PackageVariable.py similarity index 89% rename from scons/scons-local-2.4.1/SCons/Variables/PackageVariable.py rename to scons/scons-local-2.5.0/SCons/Variables/PackageVariable.py index a0244e4a3..44d87ccbb 100644 --- a/scons/scons-local-2.4.1/SCons/Variables/PackageVariable.py +++ b/scons/scons-local-2.5.0/SCons/Variables/PackageVariable.py @@ -11,7 +11,7 @@ Usage example: Examples: x11=no (disables X11 support) x11=yes (will search for the package installation dir) - x11=/usr/local/X11 (will check this path for existance) + x11=/usr/local/X11 (will check this path for existence) To replace autoconf's --with-xxx=yyy @@ -28,7 +28,7 @@ Usage example: """ # -# 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 @@ -50,7 +50,7 @@ Usage example: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Variables/PackageVariable.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Variables/PackageVariable.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __all__ = ['PackageVariable',] @@ -70,10 +70,10 @@ def _converter(val): def _validator(key, val, env, searchfunc): - # NB: searchfunc is currenty undocumented and unsupported + # NB: searchfunc is currently undocumented and unsupported """ """ - # todo: write validator, check for path + # TODO write validator, check for path import os if env[key] is True: if searchfunc: @@ -84,14 +84,14 @@ def _validator(key, val, env, searchfunc): def PackageVariable(key, help, default, searchfunc=None): - # NB: searchfunc is currenty undocumented and unsupported + # NB: searchfunc is currently undocumented and unsupported """ The input parameters describe a 'package list' option, thus they are returned with the correct converter and validator appended. The result is usable for input to opts.Add() . A 'package list' option may either be 'all', 'none' or a list of - package names (seperated by space). + package names (separated by space). """ help = '\n '.join( (help, '( yes | no | /path/to/%s )' % key)) diff --git a/scons/scons-local-2.4.1/SCons/Variables/PathVariable.py b/scons/scons-local-2.5.0/SCons/Variables/PathVariable.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/Variables/PathVariable.py rename to scons/scons-local-2.5.0/SCons/Variables/PathVariable.py index a7c68a88a..081fee598 100644 --- a/scons/scons-local-2.4.1/SCons/Variables/PathVariable.py +++ b/scons/scons-local-2.5.0/SCons/Variables/PathVariable.py @@ -2,7 +2,7 @@ This file defines an option type for SCons implementing path settings. -To be used whenever a a user-specified path override should be allowed. +To be used whenever a user-specified path override should be allowed. Arguments to PathVariable are: option-name = name of this option on the command line (e.g. "prefix") @@ -22,7 +22,7 @@ Arguments to PathVariable are: is valid. The arguments to the validator function are: (key, val, env). The key is the name of the option, the val is the path specified for the option, - and the env is the env to which the Otions have been + and the env is the env to which the Options have been added. Usage example: @@ -46,7 +46,7 @@ Usage example: """ # -# 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 @@ -68,7 +68,7 @@ Usage example: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Variables/PathVariable.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Variables/PathVariable.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __all__ = ['PathVariable',] @@ -102,7 +102,7 @@ class _PathVariableClass(object): os.makedirs(val) def PathIsFile(self, key, val, env): - """validator to check if Path is a file""" + """Validator to check if Path is a file""" if not os.path.isfile(val): if os.path.isdir(val): m = 'File path for option %s is a directory: %s' @@ -111,13 +111,12 @@ class _PathVariableClass(object): raise SCons.Errors.UserError(m % (key, val)) def PathExists(self, key, val, env): - """validator to check if Path exists""" + """Validator to check if Path exists""" if not os.path.exists(val): m = 'Path for option %s does not exist: %s' raise SCons.Errors.UserError(m % (key, val)) def __call__(self, key, help, default, validator=None): - # NB: searchfunc is currenty undocumented and unsupported """ The input parameters describe a 'path list' option, thus they are returned with the correct converter and validator appended. The diff --git a/scons/scons-local-2.4.1/SCons/Variables/__init__.py b/scons/scons-local-2.5.0/SCons/Variables/__init__.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/Variables/__init__.py rename to scons/scons-local-2.5.0/SCons/Variables/__init__.py index 57447d79a..83ec1b267 100644 --- a/scons/scons-local-2.4.1/SCons/Variables/__init__.py +++ b/scons/scons-local-2.5.0/SCons/Variables/__init__.py @@ -5,7 +5,7 @@ customizable variables to an SCons build. """ # -# 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 @@ -26,7 +26,7 @@ customizable variables to an SCons build. # 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/Variables/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Variables/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os.path import sys @@ -50,12 +50,17 @@ class Variables(object): Holds all the options, updates the environment with the variables, and renders the help text. """ - def __init__(self, files=[], args={}, is_global=1): + def __init__(self, files=None, args=None, is_global=1): """ files - [optional] List of option configuration files to load (backward compatibility) If a single string is passed it is automatically placed in a file list """ + # initialize arguments + if files is None: + files = [] + if args is None: + args = {} self.options = [] self.args = args if not SCons.Util.is_List(files): diff --git a/scons/scons-local-2.4.1/SCons/Warnings.py b/scons/scons-local-2.5.0/SCons/Warnings.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/Warnings.py rename to scons/scons-local-2.5.0/SCons/Warnings.py index 5edef279d..adf1eabd1 100644 --- a/scons/scons-local-2.4.1/SCons/Warnings.py +++ b/scons/scons-local-2.5.0/SCons/Warnings.py @@ -1,5 +1,5 @@ # -# 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 @@ -27,7 +27,7 @@ This file implements the warnings framework for SCons. """ -__revision__ = "src/engine/SCons/Warnings.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/Warnings.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import sys @@ -41,10 +41,12 @@ class WarningOnByDefault(Warning): # NOTE: If you add a new warning class, add it to the man page, too! - class TargetNotBuiltWarning(Warning): # Should go to OnByDefault pass +class CacheVersionWarning(WarningOnByDefault): + pass + class CacheWriteErrorWarning(Warning): pass diff --git a/scons/scons-local-2.4.1/SCons/__init__.py b/scons/scons-local-2.5.0/SCons/__init__.py similarity index 84% rename from scons/scons-local-2.4.1/SCons/__init__.py rename to scons/scons-local-2.5.0/SCons/__init__.py index d7ec281b2..bc557bf50 100644 --- a/scons/scons-local-2.4.1/SCons/__init__.py +++ b/scons/scons-local-2.5.0/SCons/__init__.py @@ -5,7 +5,7 @@ The main package for the SCons software construction utility. """ # -# 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 @@ -27,15 +27,15 @@ The main package for the SCons software construction utility. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/__init__.py rel_2.5.0:3544:95d356f188a3 2016/04/09 14:38:50 bdbaddog" -__version__ = "2.4.1" +__version__ = "2.5.0" -__build__ = "rel_2.4.1:3453:73fefd3ea0b0" +__build__ = "rel_2.5.0:3544:95d356f188a3[MODIFIED]" __buildsys__ = "ubuntu1404-32bit" -__date__ = "2015/11/09 03:25:05" +__date__ = "2016/04/09 14:38:50" __developer__ = "bdbaddog" diff --git a/scons/scons-local-2.4.1/SCons/compat/__init__.py b/scons/scons-local-2.5.0/SCons/compat/__init__.py similarity index 50% rename from scons/scons-local-2.4.1/SCons/compat/__init__.py rename to scons/scons-local-2.5.0/SCons/compat/__init__.py index 62f28f216..000b81faf 100644 --- a/scons/scons-local-2.4.1/SCons/compat/__init__.py +++ b/scons/scons-local-2.5.0/SCons/compat/__init__.py @@ -1,5 +1,5 @@ # -# 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 @@ -35,9 +35,6 @@ the builtins namespace or the global module list so that the rest of our code can use the objects and names imported here regardless of Python version. -Simply enough, things that go in the builtins name space come from -our _scons_builtins module. - The rest of the things here will be in individual compatibility modules that are either: 1) suitably modified copies of the future modules that we want to use; or 2) backwards compatible re-implementations of the @@ -60,7 +57,7 @@ function defined below loads the module as the "real" name (without the rest of our code will find our pre-loaded compatibility module. """ -__revision__ = "src/engine/SCons/compat/__init__.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/compat/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import os import sys @@ -85,93 +82,8 @@ def rename_module(new, old): except ImportError: return False - -rename_module('builtins', '__builtin__') -import _scons_builtins - - -try: - import hashlib -except ImportError: - # Pre-2.5 Python has no hashlib module. - try: - import_as('_scons_hashlib', 'hashlib') - except ImportError: - # If we failed importing our compatibility module, it probably - # means this version of Python has no md5 module. Don't do - # anything and let the higher layer discover this fact, so it - # can fall back to using timestamp. - pass - -try: - set -except NameError: - # Pre-2.4 Python has no native set type - import_as('_scons_sets', 'sets') - import builtins, sets - builtins.set = sets.Set - - -try: - import collections -except ImportError: - # Pre-2.4 Python has no collections module. - import_as('_scons_collections', 'collections') -else: - try: - collections.UserDict - except AttributeError: - exec('from UserDict import UserDict as _UserDict') - collections.UserDict = _UserDict - del _UserDict - try: - collections.UserList - except AttributeError: - exec('from UserList import UserList as _UserList') - collections.UserList = _UserList - del _UserList - try: - collections.UserString - except AttributeError: - exec('from UserString import UserString as _UserString') - collections.UserString = _UserString - del _UserString - - -try: - import io -except ImportError: - # Pre-2.6 Python has no io module. - import_as('_scons_io', 'io') - - -try: - os.devnull -except AttributeError: - # Pre-2.4 Python has no os.devnull attribute - _names = sys.builtin_module_names - if 'posix' in _names: - os.devnull = '/dev/null' - elif 'nt' in _names: - os.devnull = 'nul' - os.path.devnull = os.devnull -try: - os.path.lexists -except AttributeError: - # Pre-2.4 Python has no os.path.lexists function - def lexists(path): - return os.path.exists(path) or os.path.islink(path) - os.path.lexists = lexists - - -# When we're using the '-3' option during regression tests, importing -# cPickle gives a warning no matter how it's done, so always use the -# real profile module, whether it's fast or not. -if os.environ.get('SCONS_HORRIBLE_REGRESSION_TEST_HACK') is None: - # Not a regression test with '-3', so try to use faster version. - # In 3.x, 'pickle' automatically loads the fast version if available. - rename_module('pickle', 'cPickle') - +# In 3.x, 'pickle' automatically loads the fast version if available. +rename_module('pickle', 'cPickle') # In 3.x, 'profile' automatically loads the fast version if available. rename_module('profile', 'cProfile') @@ -185,49 +97,40 @@ rename_module('queue', 'Queue') rename_module('winreg', '_winreg') -try: - import subprocess -except ImportError: - # Pre-2.4 Python has no subprocess module. - import_as('_scons_subprocess', 'subprocess') - +# Python 3 moved builtin intern() to sys package +# To make porting easier, make intern always live +# in sys package (for python 2.7.x) try: sys.intern except AttributeError: - # Pre-2.6 Python has no sys.intern() function. - import builtins - try: - sys.intern = builtins.intern - except AttributeError: - # Pre-2.x Python has no builtin intern() function. - def intern(x): - return x - sys.intern = intern - del intern + # We must be using python 2.7.x so monkey patch + # intern into the sys package + sys.intern = intern + + +# Preparing for 3.x. UserDict, UserList, UserString are in +# collections for 3.x, but standalone in 2.7.x +import collections try: - sys.maxsize + collections.UserDict except AttributeError: - # Pre-2.6 Python has no sys.maxsize attribute - # Wrapping sys in () is silly, but protects it from 2to3 renames fixer - sys.maxsize = (sys).maxint + exec('from UserDict import UserDict as _UserDict') + collections.UserDict = _UserDict + del _UserDict +try: + collections.UserList +except AttributeError: + exec('from UserList import UserList as _UserList') + collections.UserList = _UserList + del _UserList -if os.environ.get('SCONS_HORRIBLE_REGRESSION_TEST_HACK') is not None: - # We can't apply the 'callable' fixer until the floor is 2.6, but the - # '-3' option to Python 2.6 and 2.7 generates almost ten thousand - # warnings. This hack allows us to run regression tests with the '-3' - # option by replacing the callable() built-in function with a hack - # that performs the same function but doesn't generate the warning. - # Note that this hack is ONLY intended to be used for regression - # testing, and should NEVER be used for real runs. - from types import ClassType - def callable(obj): - if hasattr(obj, '__call__'): return True - if isinstance(obj, (ClassType, type)): return True - return False - import builtins - builtins.callable = callable - del callable +try: + collections.UserString +except AttributeError: + exec('from UserString import UserString as _UserString') + collections.UserString = _UserString + del _UserString # Local Variables: diff --git a/scons/scons-local-2.4.1/SCons/compat/_scons_builtins.py b/scons/scons-local-2.5.0/SCons/compat/_scons_builtins.py similarity index 98% rename from scons/scons-local-2.4.1/SCons/compat/_scons_builtins.py rename to scons/scons-local-2.5.0/SCons/compat/_scons_builtins.py index b42fc2df7..cc97faf8f 100644 --- a/scons/scons-local-2.4.1/SCons/compat/_scons_builtins.py +++ b/scons/scons-local-2.5.0/SCons/compat/_scons_builtins.py @@ -51,7 +51,7 @@ the FUNCTIONS or DATA output, that means those names are already built in to this version of Python and we don't need to add them from this module. """ -__revision__ = "src/engine/SCons/compat/_scons_builtins.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/compat/_scons_builtins.py rel_2.4.1:3480:df381b06597b 2015/11/21 07:35:35 bdbaddog" import builtins diff --git a/scons/scons-local-2.4.1/SCons/compat/_scons_dbm.py b/scons/scons-local-2.5.0/SCons/compat/_scons_dbm.py similarity index 90% rename from scons/scons-local-2.4.1/SCons/compat/_scons_dbm.py rename to scons/scons-local-2.5.0/SCons/compat/_scons_dbm.py index 080c424b9..0720956fb 100644 --- a/scons/scons-local-2.4.1/SCons/compat/_scons_dbm.py +++ b/scons/scons-local-2.5.0/SCons/compat/_scons_dbm.py @@ -1,5 +1,5 @@ # -# 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 @@ that the whichdb.whichdb() implementstation in the various 2.X versions of Python won't blow up even if dbm wasn't compiled in. """ -__revision__ = "src/engine/SCons/compat/_scons_dbm.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/compat/_scons_dbm.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" class error(Exception): pass diff --git a/scons/scons-local-2.4.1/SCons/compat/_scons_hashlib.py b/scons/scons-local-2.5.0/SCons/compat/_scons_hashlib.py similarity index 97% rename from scons/scons-local-2.4.1/SCons/compat/_scons_hashlib.py rename to scons/scons-local-2.5.0/SCons/compat/_scons_hashlib.py index 626253019..e86078262 100644 --- a/scons/scons-local-2.4.1/SCons/compat/_scons_hashlib.py +++ b/scons/scons-local-2.5.0/SCons/compat/_scons_hashlib.py @@ -31,7 +31,7 @@ purposes, anyway). In fact, this module will raise an ImportError if the underlying md5 module isn't available. """ -__revision__ = "src/engine/SCons/compat/_scons_hashlib.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/compat/_scons_hashlib.py rel_2.4.1:3480:df381b06597b 2015/11/21 07:35:35 bdbaddog" import md5 from string import hexdigits diff --git a/scons/scons-local-2.4.1/SCons/cpp.py b/scons/scons-local-2.5.0/SCons/cpp.py similarity index 99% rename from scons/scons-local-2.4.1/SCons/cpp.py rename to scons/scons-local-2.5.0/SCons/cpp.py index 56bb003ab..46671afdb 100644 --- a/scons/scons-local-2.4.1/SCons/cpp.py +++ b/scons/scons-local-2.5.0/SCons/cpp.py @@ -1,5 +1,5 @@ # -# 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 @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/cpp.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/cpp.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" __doc__ = """ SCons C Pre-Processor module diff --git a/scons/scons-local-2.4.1/SCons/dblite.py b/scons/scons-local-2.5.0/SCons/dblite.py similarity index 96% rename from scons/scons-local-2.4.1/SCons/dblite.py rename to scons/scons-local-2.5.0/SCons/dblite.py index f4ba90a1f..707a4f88b 100644 --- a/scons/scons-local-2.4.1/SCons/dblite.py +++ b/scons/scons-local-2.5.0/SCons/dblite.py @@ -3,7 +3,6 @@ import SCons.compat -import builtins import os # compat layer imports "cPickle" for us if it's available. import pickle @@ -44,7 +43,7 @@ class dblite(object): # See the discussion at: # http://mail.python.org/pipermail/python-bugs-list/2003-March/016877.html - _open = builtins.open + _open = open _pickle_dump = staticmethod(pickle.dump) _os_chmod = os.chmod try: @@ -99,7 +98,10 @@ class dblite(object): if (len(p) > 0): try: self._dict = pickle.loads(p) - except (pickle.UnpicklingError, EOFError): + except (pickle.UnpicklingError, EOFError, KeyError): + # Note how we catch KeyErrors too here, which might happen + # when we don't have cPickle available (default pickle + # throws it). if (ignore_corrupt_dbfiles == 0): raise if (ignore_corrupt_dbfiles == 1): corruption_warning(self._file_name) diff --git a/scons/scons-local-2.4.1/SCons/exitfuncs.py b/scons/scons-local-2.5.0/SCons/exitfuncs.py similarity index 92% rename from scons/scons-local-2.4.1/SCons/exitfuncs.py rename to scons/scons-local-2.5.0/SCons/exitfuncs.py index ae07ec0c0..a20f049b3 100644 --- a/scons/scons-local-2.4.1/SCons/exitfuncs.py +++ b/scons/scons-local-2.5.0/SCons/exitfuncs.py @@ -5,7 +5,7 @@ Register functions which are executed when SCons exits for any reason. """ # -# 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 @@ -27,7 +27,7 @@ Register functions which are executed when SCons exits for any reason. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/exitfuncs.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/engine/SCons/exitfuncs.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import atexit diff --git a/scons/scons-local-2.4.1/scons-2.4.1-py2.7.egg-info b/scons/scons-local-2.5.0/scons-2.5.0-py2.7.egg-info similarity index 96% rename from scons/scons-local-2.4.1/scons-2.4.1-py2.7.egg-info rename to scons/scons-local-2.5.0/scons-2.5.0-py2.7.egg-info index 9e50367c6..1742cf89d 100644 --- a/scons/scons-local-2.4.1/scons-2.4.1-py2.7.egg-info +++ b/scons/scons-local-2.5.0/scons-2.5.0-py2.7.egg-info @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: scons -Version: 2.4.1 +Version: 2.5.0 Summary: Open Source next-generation build tool. Home-page: http://www.scons.org/ Author: Steven Knight diff --git a/scons/scons-time.py b/scons/scons-time.py index 054e73ebe..2e63ef211 100755 --- a/scons/scons-time.py +++ b/scons/scons-time.py @@ -9,7 +9,7 @@ # # -# 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 @@ -32,7 +32,7 @@ from __future__ import division from __future__ import nested_scopes -__revision__ = "src/script/scons-time.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/script/scons-time.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import getopt import glob @@ -43,53 +43,10 @@ import sys import tempfile import time -try: - sorted -except NameError: - # Pre-2.4 Python has no sorted() function. - # - # The pre-2.4 Python list.sort() method does not support - # list.sort(key=) nor list.sort(reverse=) keyword arguments, so - # we must implement the functionality of those keyword arguments - # by hand instead of passing them to list.sort(). - def sorted(iterable, cmp=None, key=None, reverse=False): - if key is not None: - result = [(key(x), x) for x in iterable] - else: - result = iterable[:] - if cmp is None: - # Pre-2.3 Python does not support list.sort(None). - result.sort() - else: - result.sort(cmp) - if key is not None: - result = [t1 for t0,t1 in result] - if reverse: - result.reverse() - return result - -if os.environ.get('SCONS_HORRIBLE_REGRESSION_TEST_HACK') is not None: - # We can't apply the 'callable' fixer until the floor is 2.6, but the - # '-3' option to Python 2.6 and 2.7 generates almost ten thousand - # warnings. This hack allows us to run regression tests with the '-3' - # option by replacing the callable() built-in function with a hack - # that performs the same function but doesn't generate the warning. - # Note that this hack is ONLY intended to be used for regression - # testing, and should NEVER be used for real runs. - from types import ClassType - def callable(obj): - if hasattr(obj, '__call__'): return True - if isinstance(obj, (ClassType, type)): return True - return False - def make_temp_file(**kw): try: result = tempfile.mktemp(**kw) - try: - result = os.path.realpath(result) - except AttributeError: - # Python 2.1 has no os.path.realpath() method. - pass + result = os.path.realpath(result) except TypeError: try: save_template = tempfile.template diff --git a/scons/scons.py b/scons/scons.py index e2f66bd82..2cae192af 100755 --- a/scons/scons.py +++ b/scons/scons.py @@ -2,7 +2,7 @@ # # SCons - a Software Constructor # -# 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 @@ -23,15 +23,15 @@ # 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/script/scons.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/script/scons.py rel_2.5.0:3544:95d356f188a3 2016/04/09 14:38:50 bdbaddog" -__version__ = "2.4.1" +__version__ = "2.5.0" -__build__ = "rel_2.4.1:3453:73fefd3ea0b0" +__build__ = "rel_2.5.0:3544:95d356f188a3[MODIFIED]" __buildsys__ = "ubuntu1404-32bit" -__date__ = "2015/11/09 03:25:05" +__date__ = "2016/04/09 14:38:50" __developer__ = "bdbaddog" @@ -188,8 +188,8 @@ sys.path = libs + sys.path if __name__ == "__main__": try: import SCons.Script - except: - print("Import failed. Unable to find SCons files in:") + except ImportError: + print("SCons import failed. Unable to find engine files in:") for path in libs: print(" %s" % path) raise diff --git a/scons/sconsign.py b/scons/sconsign.py index 775f23b05..38a217a54 100755 --- a/scons/sconsign.py +++ b/scons/sconsign.py @@ -2,7 +2,7 @@ # # SCons - a Software Constructor # -# 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 @@ -23,15 +23,15 @@ # 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/script/sconsign.py rel_2.4.1:3453:73fefd3ea0b0 2015/11/09 03:25:05 bdbaddog" +__revision__ = "src/script/sconsign.py rel_2.5.0:3544:95d356f188a3 2016/04/09 14:38:50 bdbaddog" -__version__ = "2.4.1" +__version__ = "2.5.0" -__build__ = "rel_2.4.1:3453:73fefd3ea0b0" +__build__ = "rel_2.5.0:3544:95d356f188a3[MODIFIED]" __buildsys__ = "ubuntu1404-32bit" -__date__ = "2015/11/09 03:25:05" +__date__ = "2016/04/09 14:38:50" __developer__ = "bdbaddog" @@ -54,6 +54,14 @@ import sys # followed by generic) so we pick up the right version of the build # engine modules if they're in either directory. + +if sys.version_info >= (3,0,0): + msg = "sconsign: *** Version %s does not run under Python version %s.\n\ +Python 3 is not yet supported.\n" + sys.stderr.write(msg % (__version__, sys.version.split()[0])) + sys.exit(1) + + script_dir = sys.path[0] if script_dir in sys.path: @@ -64,6 +72,11 @@ libs = [] if "SCONS_LIB_DIR" in os.environ: libs.append(os.environ["SCONS_LIB_DIR"]) +# - running from source takes priority (since 2.3.2), excluding SCONS_LIB_DIR settings +script_path = os.path.abspath(os.path.dirname(__file__)) +source_path = os.path.join(script_path, '..', 'engine') +libs.append(source_path) + local_version = 'scons-local-' + __version__ local = 'scons-local' if script_dir: @@ -463,12 +476,22 @@ for o, a in opts: elif o in ('-e', '--entry'): Print_Entries.append(a) elif o in ('-f', '--format'): + # Try to map the given DB format to a known module + # name, that we can then try to import... Module_Map = {'dblite' : 'SCons.dblite', 'sconsign' : None} dbm_name = Module_Map.get(a, a) if dbm_name: try: - dbm = my_import(dbm_name) + if dbm_name != "SCons.dblite": + dbm = my_import(dbm_name) + else: + import SCons.dblite + dbm = SCons.dblite + # Ensure that we don't ignore corrupt DB files, + # this was handled by calling my_import('SCons.dblite') + # again in earlier versions... + SCons.dblite.ignore_corrupt_dbfiles = 0 except: sys.stderr.write("sconsign: illegal file format `%s'\n" % a) print helpstr @@ -500,7 +523,15 @@ else: dbm_name = whichdb.whichdb(a) if dbm_name: Map_Module = {'SCons.dblite' : 'dblite'} - dbm = my_import(dbm_name) + if dbm_name != "SCons.dblite": + dbm = my_import(dbm_name) + else: + import SCons.dblite + dbm = SCons.dblite + # Ensure that we don't ignore corrupt DB files, + # this was handled by calling my_import('SCons.dblite') + # again in earlier versions... + SCons.dblite.ignore_corrupt_dbfiles = 0 Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a) else: Do_SConsignDir(a)