Пример #1
0
def packagedin(abspath):
    """Return the package name that contains the asset `abspath`."""
    from pluggdapps import papackages  # Keep this line, don't shuffle around !!

    locations = {pinfo['location']: p for p, pinfo in papackages.items()}
    prefix = longest_prefix(locations.keys(), abspath)
    return locations[prefix] if prefix else None
Пример #2
0
def packagedin( abspath ):
    """Return the package name that contains the asset `abspath`."""
    from pluggdapps import papackages # Keep this line, don't shuffle around !!

    locations = { pinfo['location'] : p for p, pinfo in papackages.items() }
    prefix = longest_prefix( locations.keys(), abspath )
    return locations[prefix] if prefix else None
Пример #3
0
 def ttlfiles( self ):
     """Return a list of ttlfile related to this environment."""
     from pluggdapps import papackages
     ttlfiles = h.flatten(
         [ list( map( h.abspath_from_asset_spec, n.get('ttlplugins', []) ))
           for nm, n in papackages.items() ]
     )
     return ttlfiles + self.pa._monitoredfiles
Пример #4
0
 def ttlfiles(self):
     """Return a list of ttlfile related to this environment."""
     from pluggdapps import papackages
     ttlfiles = h.flatten([
         list(map(h.abspath_from_asset_spec, n.get('ttlplugins', [])))
         for nm, n in papackages.items()
     ])
     return ttlfiles + self.pa._monitoredfiles