Exemple #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)
Exemple #2
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)
Exemple #3
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))
Exemple #4
0
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))
Exemple #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))
Exemple #6
0
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))
Exemple #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))
Exemple #8
0
def package_is_installed(prefix, package):
    return any(p.startswith(package) for p in install_linked(prefix))