diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 73476e0cec..6cfd2ce86f 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -290,9 +290,11 @@ def get_ext_outputs(self): paths = {self.bdist_dir: ''} for base, dirs, files in sorted_walk(self.bdist_dir): - for filename in files: - if os.path.splitext(filename)[1].lower() in NATIVE_EXTENSIONS: - all_outputs.append(paths[base] + filename) + all_outputs.extend( + paths[base] + filename + for filename in files + if os.path.splitext(filename)[1].lower() in NATIVE_EXTENSIONS + ) for filename in dirs: paths[os.path.join(base, filename)] = paths[base] + filename + '/' diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 5ec5080131..801a7df768 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1203,10 +1203,11 @@ def build_and_install(self, setup_script, setup_base): self.run_setup(setup_script, setup_base, args) all_eggs = Environment([dist_dir]) - eggs = [] - for key in all_eggs: - for dist in all_eggs[key]: - eggs.append(self.install_egg(dist.location, setup_base)) + eggs = [ + self.install_egg(dist.location, setup_base) + for key in all_eggs + for dist in all_eggs[key] + ] if not eggs and not self.dry_run: log.warn("No eggs found in %s (setup script problem?)", dist_dir) return eggs