diff options
author | Matthew Iversen <teh.ivo@gmail.com> | 2014-06-22 22:01:17 +1000 |
---|---|---|
committer | Matthew Iversen <teh.ivo@gmail.com> | 2014-06-22 22:01:17 +1000 |
commit | 9ec3bbc7bcef27123270535c1a3ab7cc9adda95d (patch) | |
tree | 9d18af20a5c67c16b4ba1c60bf1351a2a7990289 /setuptools/command/install_egg_info.py | |
parent | 92683cba709e8ee497e2b8f4413d44ddcee5cc2f (diff) | |
download | external_python_setuptools-9ec3bbc7bcef27123270535c1a3ab7cc9adda95d.tar.gz external_python_setuptools-9ec3bbc7bcef27123270535c1a3ab7cc9adda95d.tar.bz2 external_python_setuptools-9ec3bbc7bcef27123270535c1a3ab7cc9adda95d.zip |
Clean up _get_all_ns_packages
Diffstat (limited to 'setuptools/command/install_egg_info.py')
-rwxr-xr-x | setuptools/command/install_egg_info.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py index 411fce6b..578aa3d4 100755 --- a/setuptools/command/install_egg_info.py +++ b/setuptools/command/install_egg_info.py @@ -95,12 +95,11 @@ class install_egg_info(Command): f.close() def _get_all_ns_packages(self): - nsp = {} + """Return sorted list of all package namespaces""" + nsp = set() for pkg in self.distribution.namespace_packages or []: pkg = pkg.split('.') while pkg: - nsp['.'.join(pkg)] = 1 + nsp.add('.'.join(pkg)) pkg.pop() - nsp = list(nsp) - nsp.sort() # set up shorter names first - return nsp + return sorted(nsp) |