summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/install.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Tool/install.py')
-rw-r--r--engine/SCons/Tool/install.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/engine/SCons/Tool/install.py b/engine/SCons/Tool/install.py
index 9ae78fa..f3e4227 100644
--- a/engine/SCons/Tool/install.py
+++ b/engine/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