def get_packages(package):
    return [dirpath
            for dirpath, dirnames, filenames in os.walk(package)
            if os.path.exists(os.path.join(dirpath, '__init__.py'))]
Return root package and all sub-packages.
dataset/ETHPy150Open vintasoftware/django-role-permissions/setup.py/get_packages