Returns the folder the package is located in.
970054
def getReposPackageFolder():
	""""""
	libdir = sysconfig.get_python_lib()
	repodir = os.path.join(libdir, "calcrepo", "repos")
	return repodir
641737
def hlp_source_under(folder):
    
    # walk the folder and find the __init__.py entries for packages.
    packages = []
    package_dir = dict()
    for root, dirs, files in os.walk(folder):
        for file in files:
            if file != '__init__.py':
                continue
            full = os.path.dirname(os.path.join(root, file))
            relative = os.path.relpath(full, folder)
            packages.append(relative)
            package_dir[relative] = full
    # we use pprint because we want the order to always remain the same
    return 'packages={0},\npackage_dir={1}'.format(sorted(packages), pprint.pformat(package_dir))
901443
def folder_name(self):
        ''''''
        name = self.site_packages_name
        if name is None:
            name = self.name
        return name
1050625
def bundle_dir():
    """"""
    if frozen():
        directory = sys._MEIPASS
    else:
        directory = os.path.dirname(os.path.abspath(stack()[1][1]))
    if os.path.exists(directory):
        return directory
205697
function getProjectRootDirectory() {
  // From the current directory, check if parent directories have a package.json file and if it contains
  // a reference to the @myrmex/core node_module
  let cwd = process.cwd();
  let packageJson;
  let found = false;

  do {
    try {
      packageJson = require(path.join(cwd, 'package.json'));
      if ((packageJson.dependencies && packageJson.dependencies['@myrmex/core'])
        || (packageJson.devDependencies && packageJson.devDependencies['@myrmex/core'])) {
        found = true;
      } else {
        cwd = path.dirname(cwd);
      }
    } catch (e) {
      cwd = path.dirname(cwd);
    }
  } while (cwd !== path.dirname(cwd) && !found);
  if (found) {
    return cwd;
  }
  return false;
}
1298345
def package_path(self, team, user, package):
        
        return os.path.join(self.user_path(team, user), package)
1290791
@Nullable
    public final String getDefFolder() {
        if (getFolder() == null) {
            if (parent == null) {
                return null;
            }
            return parent.getFolder();
        }
        return getFolder();
    }
14632
def _package_top_dir(self):
        
        r = [self.package_dir]
        for l in self._pip_locations:
            if l is not None:
                r.append(l)
        for l in self._pkg_resources_locations:
            if l is not None:
                r.append(l)
        return sorted(list(set(r)))
1334499
def directory(self):
        """"""
        if self._directory is None:
            return self.service_group.hitch_dir.hitch_dir
        else:
            return self._directory
657885
def get_package_path(name):
    
    name = name.lower()  # use lowercase version to be safe
    # Here we're importing the module just to find it. This is worryingly
    # indirect, but it's otherwise very difficult to find the package.
    pkg = importlib.import_module(name)
    return Path(pkg.__file__).parent
166098
public function guessPackagePath()
    {
        $reflection = new ReflectionClass($this);

        $path = $reflection->getFileName();

        return realpath(dirname($path) .'/../');
    }
354033
def path(self):
        '''  '''
        if isinstance(self.dir, Directory):
            return self.dir._path
        elif isinstance(self.dir, ROOT.TDirectory):
            return self.dir.GetPath()
        elif isinstance(self.dir, _FolderView):
            return self.dir.path()
        else:
            return str(self.dir)
154227
def get_package_dir(nb_path):
    
    doc = get_metatab_doc(nb_path)
    doc.update_name(force=True, create_term=True)
    pkg_name = doc['Root'].get_value('Root.Name')
    assert pkg_name

    return ensure_source_package_dir(nb_path, pkg_name), pkg_name
575945
def get_notebook_rel_path(pkg=None):
    """"""
    pkg = pkg or open_source_package()
    pkg_path = str(pkg.package_url.fspath)
    nb_path = get_notebook_path()

    return nb_path.replace(pkg_path, '').strip('/')
372904
String getPackage() {
        if (this.packageName != null)
            return this.packageName;
        if (this.parent != null)
            return this.parent.getPackage();
        return null;
    }
137424
protected function getPackagePath()
    {
        $reflection = new ReflectionObject($this);
        $fileName = $reflection->getFileName();
        $packagePath = dirname(dirname(dirname(dirname(dirname(dirname($fileName))))));
        return $packagePath;
    }
1343450
def vcpkg_dir():
    
    for p in ["vcpkg-exported", "C:/tools/vcpkg", "C:/open/vcpkg"]:
        if os.path.isdir(p):
            return os.path.realpath(p)
    raise Exception("cannot find vcpkg")