diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-10-03 06:26:58 +0200 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-10-03 06:26:58 +0200 | 
| commit | 27b47b5db42407baf5d704bf52c35015b2c0ad7b (patch) | |
| tree | 320f8d5fc315c211f7d073891bd7117754f5f5b3 /src/engine/SCons/Tool/install.py | |
| parent | 6be31f5d140b81227911cabfc61d3802c76c1b61 (diff) | |
| parent | fabd454ddf505302bf41ef4da0609437c29d5605 (diff) | |
Merge branch 'release/3.0.0+repack-1'3.0.0+repack-1
Diffstat (limited to 'src/engine/SCons/Tool/install.py')
| -rw-r--r-- | src/engine/SCons/Tool/install.py | 25 | 
1 files changed, 13 insertions, 12 deletions
diff --git a/src/engine/SCons/Tool/install.py b/src/engine/SCons/Tool/install.py index 4cebf5b..12dcf8f 100644 --- a/src/engine/SCons/Tool/install.py +++ b/src/engine/SCons/Tool/install.py @@ -8,7 +8,7 @@ selection method.  """  # -# Copyright (c) 2001 - 2016 The SCons Foundation +# Copyright (c) 2001 - 2017 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,8 +29,9 @@ 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.  # +from __future__ import print_function -__revision__ = "src/engine/SCons/Tool/install.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" +__revision__ = "src/engine/SCons/Tool/install.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog"  import os  import re @@ -48,7 +49,7 @@ _UNIQUE_INSTALLED_FILES = None  class CopytreeError(EnvironmentError):      pass -                 +  # This is a patched version of shutil.copytree from python 2.5.  It  # doesn't fail if the dir exists, which regular copytree does  # (annoyingly).  Note the XXX comment in the docstring. @@ -83,21 +84,21 @@ def scons_copytree(src, dst, symlinks=False):              else:                  shutil.copy2(srcname, dstname)              # XXX What about devices, sockets etc.? -        except (IOError, os.error), why: +        except (IOError, os.error) as why:              errors.append((srcname, dstname, str(why)))          # catch the CopytreeError from the recursive copytree so that we can          # continue with other files -        except CopytreeError, err: +        except CopytreeError as err:              errors.extend(err.args[0])      try:          shutil.copystat(src, dst)      except SCons.Util.WinError:          # can't copy file access times on Windows          pass -    except OSError, why: +    except OSError as why:          errors.extend((src, dst, str(why)))      if errors: -        raise CopytreeError, errors +        raise CopytreeError(errors)  # @@ -165,10 +166,9 @@ def listShlibLinksToInstall(dest, source, env):  def installShlibLinks(dest, source, env):      """If we are installing a versioned shared library create the required links."""      Verbose = False -      symlinks = listShlibLinksToInstall(dest, source, env)      if Verbose: -        print 'installShlibLinks: symlinks=%r' % SCons.Tool.StringizeLibSymlinks(symlinks) +        print('installShlibLinks: symlinks={:r}'.format(SCons.Tool.StringizeLibSymlinks(symlinks)))      if symlinks:          SCons.Tool.CreateLibSymlinks(env, symlinks)      return @@ -244,12 +244,10 @@ def add_versioned_targets_to_INSTALLED_FILES(target, source, env):      Verbose = False      _INSTALLED_FILES.extend(target)      if Verbose: -        print "add_versioned_targets_to_INSTALLED_FILES: target=%r" % map(str, target) - +        print("add_versioned_targets_to_INSTALLED_FILES: target={:r}".format(list(map(str, target))))      symlinks = listShlibLinksToInstall(target[0], source, env)      if symlinks:          SCons.Tool.EmitLibSymlinks(env, symlinks, target[0]) -              _UNIQUE_INSTALLED_FILES = None      return (target, source) @@ -307,6 +305,7 @@ def InstallBuilderWrapper(env, target=None, source=None, dir=None, **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): @@ -315,6 +314,7 @@ def InstallAsBuilderWrapper(env, target=None, source=None, **kw):  BaseVersionedInstallBuilder = None +  def InstallVersionedBuilderWrapper(env, target=None, source=None, dir=None, **kw):      if target and dir:          import SCons.Errors @@ -346,6 +346,7 @@ def InstallVersionedBuilderWrapper(env, target=None, source=None, dir=None, **kw  added = None +  def generate(env):      from SCons.Script import AddOption, GetOption  | 
