Find all of the packages.
(top=HERE)
| 107 | |
| 108 | |
| 109 | def find_packages(top=HERE): |
| 110 | """ |
| 111 | Find all of the packages. |
| 112 | """ |
| 113 | packages = [] |
| 114 | for d, dirs, _ in os.walk(top, followlinks=True): |
| 115 | if os.path.exists(pjoin(d, '__init__.py')): |
| 116 | packages.append(os.path.relpath(d, top).replace(os.path.sep, '.')) |
| 117 | elif d != top: |
| 118 | # Do not look for packages in subfolders if current is not a package |
| 119 | dirs[:] = [] |
| 120 | return packages |
| 121 | |
| 122 | |
| 123 | def update_package_data(distribution): |