aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/install_egg_info.py
diff options
context:
space:
mode:
authorMatthew Iversen <teh.ivo@gmail.com>2014-06-22 22:01:17 +1000
committerMatthew Iversen <teh.ivo@gmail.com>2014-06-22 22:01:17 +1000
commit9ec3bbc7bcef27123270535c1a3ab7cc9adda95d (patch)
tree9d18af20a5c67c16b4ba1c60bf1351a2a7990289 /setuptools/command/install_egg_info.py
parent92683cba709e8ee497e2b8f4413d44ddcee5cc2f (diff)
downloadexternal_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-xsetuptools/command/install_egg_info.py9
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)