Logo Search packages:      
Sourcecode: blender version File versions  Download package

def SCons::Tool::packaging::Tag (   env,
  target,
  source,
  more_tags,
  kw_tags 
)

Tag a file with the given arguments, just sets the accordingly named
attribute on the file object.

TODO: FIXME

Definition at line 45 of file __init__.py.

00045                                                    :
    """ Tag a file with the given arguments, just sets the accordingly named
    attribute on the file object.

    TODO: FIXME
    """
    if not target:
        target=source
        first_tag=None
    else:
        first_tag=source

    if first_tag:
        kw_tags[first_tag[0]] = ''

    if len(kw_tags) == 0 and len(more_tags) == 0:
        raise UserError, "No tags given."

    # XXX: sanity checks
    for x in more_tags:
        kw_tags[x] = ''

    if not SCons.Util.is_List(target):
        target=[target]
    else:
        # hmm, sometimes the target list, is a list of a list
        # make sure it is flattened prior to processing.
        # TODO: perhaps some bug ?!?
        target=env.Flatten(target)

    for t in target:
        for (k,v) in kw_tags.items():
            # all file tags have to start with PACKAGING_, so we can later
            # 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
            setattr(t, k, v)

def Package(env, target=None, source=None, **kw):


Generated by  Doxygen 1.6.0   Back to index