summaryrefslogtreecommitdiff
path: root/setuptools/command/install_lib.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-09-26 10:43:35 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-09-26 10:43:35 -0400
commitb43f75980dd674153cafec047709092438d54b5c (patch)
tree38b06caec97a2a825bc99df9fb9b0f6f38ecb7c0 /setuptools/command/install_lib.py
parent10e504abc7f0a0c45157bf4d6cbbd63dea6a67dd (diff)
downloadpython-setuptools-git-b43f75980dd674153cafec047709092438d54b5c.tar.gz
Rewrite package traversal as a generator expression
Diffstat (limited to 'setuptools/command/install_lib.py')
-rw-r--r--setuptools/command/install_lib.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py
index 92490b6e..7f157a0f 100644
--- a/setuptools/command/install_lib.py
+++ b/setuptools/command/install_lib.py
@@ -18,8 +18,12 @@ class install_lib(orig.install_lib):
"""
exclude = set()
pkg_path = lambda pkg: os.path.join(self.install_dir, *pkg.split('.'))
- for ns_pkg in self._get_SVEM_NSPs():
- for pkg in self._all_packages(ns_pkg):
+ all_packages = (
+ pkg
+ for ns_pkg in self._get_SVEM_NSPs()
+ for pkg in self._all_packages(ns_pkg)
+ )
+ for pkg in all_packages:
for f in self._gen_exclude_names():
exclude.add(os.path.join(pkg_path(pkg), f))
return exclude