Commit f19e5732 authored by Jason R. Coombs's avatar Jason R. Coombs

Use rpartition for simplicity

parent d7c802d0
......@@ -112,9 +112,8 @@ def check_nsp(dist, attr, value):
"Distribution contains no modules or packages for " +
"namespace package %r" % nsp
)
if '.' in nsp:
parent = '.'.join(nsp.split('.')[:-1])
if parent not in value:
parent, sep, child = nsp.rpartition('.')
if parent and parent not in value:
distutils.log.warn(
"WARNING: %r is declared as a package namespace, but %r"
" is not: please correct this in setup.py", nsp, parent
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment