parameters: (self, dname, core_data)
return_statement: return extensions
docstring: Get the extensions in a given directory.
docstring_summary: Get the extensions in a given directory.
docstring_tokens: Get the extensions in a given directory .
function: def _get_extensions_in_dir(self, dname, core_data):
          """Get the extensions in a given directory.
          """
          extensions = dict()
          location = 'app' if dname == self.app_dir else 'sys'
          for target in glob(pjoin(dname, 'extensions', '*.tgz')):
              data = read_package(target)
              deps = data.get('dependencies', dict())
              name = data['name']
              jlab = data.get('jupyterlab', dict())
              path = osp.abspath(target)
  
              filename = osp.basename(target)
              if filename.startswith(PIN_PREFIX):
                  alias = filename[len(PIN_PREFIX):-len(".tgz")]
              else:
                  alias = None
              url = get_package_url(data)
              extensions[alias or name] = dict(path=path,
                                      filename=osp.basename(path),
                                      url=url,
                                      version=data['version'],
                                      # Only save the package name if the extension name is an alias
                                      alias_package_source=name if alias else None,
                                      jupyterlab=jlab,
                                      dependencies=deps,
                                      tar_dir=osp.dirname(path),
                                      location=location)
          return extensions
function_tokens: def _get_extensions_in_dir ( self , dname , core_data ) : extensions = dict ( ) location = 'app' if dname == self . app_dir else 'sys' for target in glob ( pjoin ( dname , 'extensions' , '*.tgz' ) ) : data = read_package ( target ) deps = data . get ( 'dependencies' , dict ( ) ) name = data [ 'name' ] jlab = data . get ( 'jupyterlab' , dict ( ) ) path = osp . abspath ( target ) filename = osp . basename ( target ) if filename . startswith ( PIN_PREFIX ) : alias = filename [ len ( PIN_PREFIX ) : - len ( ".tgz" ) ] else : alias = None url = get_package_url ( data ) extensions [ alias or name ] = dict ( path = path , filename = osp . basename ( path ) , url = url , version = data [ 'version' ] , # Only save the package name if the extension name is an alias alias_package_source = name if alias else None , jupyterlab = jlab , dependencies = deps , tar_dir = osp . dirname ( path ) , location = location ) return extensions