def _namespace_package_path(fqname, pathnames, path=None):
 working_set = pkg_resources.WorkingSet(path)
 path = list(pathnames)
 for dist in working_set:
  if dist.has_metadata('namespace_packages.txt'):
   namespaces = dist.get_metadata('namespace_packages.txt').splitlines()
   if (fqname in namespaces):
    nspath = os.path.join(dist.location, *fqname.split('.'))
    if (nspath not in path):
     path.append(nspath)
 return path

def _namespace_package_path ( fqname , pathnames , path = None ) : working_set = pkg_resources . WorkingSet ( path ) path = list ( pathnames ) for dist in working_set : if dist . has_metadata ( 'namespace_packages.txt' ) : namespaces = dist . get_metadata ( 'namespace_packages.txt' ) . splitlines ( ) if ( fqname in namespaces ) : nspath = os . path . join ( dist . location , * fqname . split ( '.' ) ) if ( nspath not in path ) : path . append ( nspath ) return path
return the __path__ for the python package in *fqname* .