(dist, attr, value)
Verify that namespace packages are valid
Verify that namespace packages are valid
Verify that namespace packages are valid
def check_nsp(dist, attr, value):
    """Verify that namespace packages are valid"""
    ns_packages = value
    assert_string_list(dist, attr, ns_packages)
    for nsp in ns_packages:
        if not dist.has_contents_for(nsp):
            raise DistutilsSetupError(
                "Distribution contains no modules or packages for " +
                "namespace package %r" % nsp
            )
        parent, sep, child = nsp.rpartition('.')
        if parent and parent not in ns_packages:
            distutils.log.warn(
                "WARNING: %r is declared as a package namespace, but %r"
                " is not: please correct this in setup.py", nsp, parent
            )
def check_nsp ( dist , attr , value ) : ns_packages = value assert_string_list ( dist , attr , ns_packages ) for nsp in ns_packages : if not dist . has_contents_for ( nsp ) : raise DistutilsSetupError ( "Distribution contains no modules or packages for " + "namespace package %r" % nsp ) parent , sep , child = nsp . rpartition ( '.' ) if parent and parent not in ns_packages : distutils . log . warn ( "WARNING: %r is declared as a package namespace, but %r" " is not: please correct this in setup.py" , nsp , parent )