Commit b43f7598 authored by Jason R. Coombs's avatar Jason R. Coombs

Rewrite package traversal as a generator expression

parent 10e504ab
...@@ -18,8 +18,12 @@ class install_lib(orig.install_lib): ...@@ -18,8 +18,12 @@ class install_lib(orig.install_lib):
""" """
exclude = set() exclude = set()
pkg_path = lambda pkg: os.path.join(self.install_dir, *pkg.split('.')) pkg_path = lambda pkg: os.path.join(self.install_dir, *pkg.split('.'))
for ns_pkg in self._get_SVEM_NSPs(): all_packages = (
for pkg in self._all_packages(ns_pkg): 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(): for f in self._gen_exclude_names():
exclude.add(os.path.join(pkg_path(pkg), f)) exclude.add(os.path.join(pkg_path(pkg), f))
return exclude return exclude
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment