コード例 #1
0
def package_is_installed(prefix, package, exact=False):
    packages = list(install_linked(prefix))
    if '::' not in package:
        packages = list(map(dist2dirname, packages))
    if exact:
        return package in packages
    return any(p.startswith(package) for p in packages)
コード例 #2
0
ファイル: test_create.py プロジェクト: uvyouver/conda
def package_is_installed(prefix, package, exact=False):
    packages = list(install_linked(prefix))
    if '::' not in package:
        packages = list(map(dist2dirname, packages))
    if exact:
        return package in packages
    return any(p.startswith(package) for p in packages)
コード例 #3
0
ファイル: test_create.py プロジェクト: uvyouver/conda
def assert_package_is_installed(prefix, package, exact=False):
    if not package_is_installed(prefix, package, exact):
        print(list(install_linked(prefix)))
        raise AssertionError("package {0} is not in prefix".format(package))
コード例 #4
0
ファイル: test_create.py プロジェクト: fschlimb/conda
def package_is_installed(prefix, package, exact=False):
    if exact:
        return any(p == package for p in install_linked(prefix))
    return any(p.startswith(package) for p in install_linked(prefix))
コード例 #5
0
def assert_package_is_installed(prefix, package, exact=False):
    if not package_is_installed(prefix, package, exact):
        print(list(install_linked(prefix)))
        raise AssertionError("package {0} is not in prefix".format(package))
コード例 #6
0
ファイル: test_create.py プロジェクト: ezc/conda
def package_is_installed(prefix, package, exact=False):
    if exact:
        return any(p == package for p in install_linked(prefix))
    return any(p.startswith(package) for p in install_linked(prefix))
コード例 #7
0
def assert_package_is_installed(prefix, package):
    if not package_is_installed(prefix, package):
        print([p for p in install_linked(prefix)])
        raise AssertionError("package {0} is not in prefix".format(package))
コード例 #8
0
def package_is_installed(prefix, package):
    return any(p.startswith(package) for p in install_linked(prefix))