Return the full path for the packages and repository freezer
    files.
198888
def _paths(name=None):
    '''
    

    '''
    name = 'freezer' if not name else name
    states_path = _states_path()
    return (
        os.path.join(states_path, '{}-pkgs.yml'.format(name)),
        os.path.join(states_path, '{}-reps.yml'.format(name)),
    )
1346551
def fullpath(self):
        
        return str(os.path.join(self.path, self.directory))
392102
def packageRootPath(path):
    
    path = nstr(path)
    if os.path.isfile(path):
        path = os.path.dirname(path)

    parts = os.path.normpath(path).split(os.path.sep)
    package_parts = []

    for i in range(len(parts), 0, -1):
        filename = os.path.sep.join(parts[:i] + ['__init__.py'])

        if not os.path.isfile(filename):
            break

        package_parts.insert(0, parts[i - 1])

    if not package_parts:
        return path
    return os.path.abspath(os.path.sep.join(parts[:-len(package_parts)]))
1265588
public function findAll()
    {
        $repos = array();
        foreach ($this->repository->findAll() as $repo) {
            $this->loadPackagistInfos($repo);
            $repos[] = $repo;
        }

        return $repos;
    }
896321
def get_repo_relpath(repo, relpath):
    
    from os import path
    if relpath[0:2] == "./":
        return path.join(repo, relpath[2::])
    else:
        from os import chdir, getcwd
        cd = getcwd()
        chdir(path.expanduser(repo))
        result = path.abspath(relpath)
        chdir(cd)
        return result
488995
def get_package_sources(self):
        """"""
        # Checkout local modules
        for config in self.sources.get('local', []):
            self.fetch_local_package(config=config)
        # Checkout S3 repositories specified in config
        for config in self.sources.get('s3', []):
            self.fetch_s3_package(config=config)
        # Checkout git repositories specified in config
        for config in self.sources.get('git', []):
            self.fetch_git_package(config=config)
96573
def getpaths(self,libname):
        """"""
        if os.path.isabs(libname):
            yield libname
        else:
            # FIXME / TODO return '.' and os.path.dirname(__file__)
            for path in self.getplatformpaths(libname):
                yield path

            path = ctypes.util.find_library(libname)
            if path: yield path
557452
def full_path(self):
        
        if "local" in self.driver.name.lower():
            return "%s/%s" % self.container.key, self.path
        return self.path
640861
def store(self):
        
        data = repo_data(self.PACKAGES_TXT, "slack", self.flag)
        black = BlackList().packages(pkgs=data[0], repo="slack")
        for name, loc, comp, uncomp in zip(data[0], data[1], data[2], data[3]):
            status(0.0003)
            repo_pkg_name = split_package(name)[0]
            if (not os.path.isfile(self.meta.pkg_path + name[:-4]) and
                    repo_pkg_name not in black and
                    repo_pkg_name not in self.skip):
                self.dwn_links.append("{0}{1}/{2}".format(mirrors("", ""),
                                                          loc, name))
                self.comp_sum.append(comp)
                self.uncomp_sum.append(uncomp)
                self.upgrade_all.append(name)
                self.count_upg += 1
                if not find_package(repo_pkg_name + self.meta.sp,
                                    self.meta.pkg_path):
                    self.count_added += 1
                    self.count_upg -= 1
        return self.count_upg
1078951
def R_package_path(package):
    
    local_sitelib = R_sitelib()
    rscript = Rscript_cmd()
    cmd = """{rscript} --no-environ -e '.libPaths(c("{local_sitelib}")); find.package("{package}")'"""
    try:
        output = subprocess.check_output(cmd.format(**locals()), shell=True)
    except subprocess.CalledProcessError as e:
        return None
    for line in output.decode().split("\n"):
        if "[1]" not in line:
            continue
        dirname = line.split("[1]")[1].replace("\"", "").strip()
        if os.path.exists(dirname):
            return dirname
    return None
188081
def _get_remote_import_paths(self, pkg, gopath=None):
    
    import_listing = self.import_oracle.list_imports(pkg, gopath=gopath)
    return [imp for imp in import_listing.imports
            if (not self.import_oracle.is_go_internal_import(imp) and
                # We assume relative imports are local to the package and skip attempts to
                # recursively resolve them.
                not self._is_relative(imp))]
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)))
839954
def _get_containers(self):
        """"""

        def full_fn(path):
            return os.path.join(self.abs_root, path)
        return [self.cont_cls.from_path(self, d)
                for d in os.listdir(self.abs_root) if is_dir(full_fn(d))]
341655
def get_paths(cls, packages):
        """"""
        allowable_packages = dict((app_config.name, app_config) for app_config in apps.get_app_configs())
        app_configs = [allowable_packages[p] for p in packages if p in allowable_packages]
        # paths of requested packages
        return [os.path.join(app.path, 'locale') for app in app_configs]
367681
def find_packages_under(path):
    
    all_packages = setuptools.find_packages()
    packages = []
    for package in all_packages:
        package_split = package.split(".")
        if package_split[0] == path:
            packages.append(package)
    return packages
1182960
def load(cls, env):  # type: (Env) -> InstalledRepository
        
        repo = cls()

        freeze_output = env.run("pip", "freeze")
        for line in freeze_output.split("\n"):
            if "==" in line:
                name, version = re.split("={2,3}", line)
                repo.add_package(Package(name, version, version))
            elif line.startswith("-e "):
                line = line[3:].strip()
                if line.startswith("git+"):
                    url = line.lstrip("git+")
                    if "@" in url:
                        url, rev = url.rsplit("@", 1)
                    else:
                        rev = "master"

                    name = url.split("/")[-1].rstrip(".git")
                    if "#egg=" in rev:
                        rev, name = rev.split("#egg=")

                    package = Package(name, "0.0.0")
                    package.source_type = "git"
                    package.source_url = url
                    package.source_reference = rev

                    repo.add_package(package)

        return repo
410655
static function repositoryPath()
    {
        $ini = eZINI::instance();
        $packageIni = eZINI::instance( 'package.ini' );

        return eZDir::path( array( 'var',
                                   $ini->variable( 'FileSettings', 'StorageDir' ),
                                   $packageIni->variable( 'RepositorySettings', 'RepositoryDirectory' ) ) );
    }