summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/packaging/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Tool/packaging/__init__.py')
-rw-r--r--engine/SCons/Tool/packaging/__init__.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/engine/SCons/Tool/packaging/__init__.py b/engine/SCons/Tool/packaging/__init__.py
index b7fb43b..2107d5f 100644
--- a/engine/SCons/Tool/packaging/__init__.py
+++ b/engine/SCons/Tool/packaging/__init__.py
@@ -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.3.5:3347:d31d5a4e74b6 2015/07/31 14:36:10 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/packaging/__init__.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
import SCons.Environment
from SCons.Variables import *
@@ -80,7 +80,7 @@ def Tag(env, target, source, *more_tags, **kw_tags):
#if not k.startswith('PACKAGING_'):
if k[:10] != 'PACKAGING_':
k='PACKAGING_'+k
- setattr(t, k, v)
+ t.Tag(k, v)
def Package(env, target=None, source=None, **kw):
""" Entry point for the package tool.
@@ -235,9 +235,11 @@ def copy_attr(f1, 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_'
- pattrs = list(filter(copyit, dir(f1)))
- for attr in pattrs:
- setattr(f2, attr, getattr(f1, attr))
+ if f1._tags:
+ pattrs = list(filter(copyit, f1._tags))
+ for attr in pattrs:
+ f2.Tag(attr, f1.GetTag(attr))
+
def putintopackageroot(target, source, env, pkgroot, honor_install_location=1):
""" Uses the CopyAs builder to copy all source files to the directory given
in pkgroot.
@@ -262,9 +264,9 @@ def putintopackageroot(target, source, env, pkgroot, honor_install_location=1):
if file.is_under(pkgroot):
new_source.append(file)
else:
- if hasattr(file, 'PACKAGING_INSTALL_LOCATION') and\
+ if file.GetTag('PACKAGING_INSTALL_LOCATION') and\
honor_install_location:
- new_name=make_path_relative(file.PACKAGING_INSTALL_LOCATION)
+ new_name=make_path_relative(file.GetTag('PACKAGING_INSTALL_LOCATION'))
else:
new_name=make_path_relative(file.get_path())
@@ -301,7 +303,7 @@ def stripinstallbuilder(target, source, env):
for ss in s.sources:
n_source.append(ss)
copy_attr(s, ss)
- setattr(ss, 'PACKAGING_INSTALL_LOCATION', s.get_path())
+ ss.Tag('PACKAGING_INSTALL_LOCATION', s.get_path())
return (target, n_source)