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