def find_packages_by_root_package(where):
 root_package = os.path.basename(where)
 packages = [('%s.%s' % (root_package, sub_package)) for sub_package in find_packages(where)]
 packages.insert(0, root_package)
 return packages

def find_packages_by_root_package ( where ) : root_package = os . path . basename ( where ) packages = [ ( '%s.%s' % ( root_package , sub_package ) ) for sub_package in find_packages ( where ) ] packages . insert ( 0 , root_package ) return packages
better than excluding everything that is not needed .