aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/install_lib.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-09-26 10:46:14 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-09-26 10:46:14 -0400
commitb908527864443899b89cf568ac9397aef7ad16c9 (patch)
tree74c02726de8d6281046b346c16749d086826ac07 /setuptools/command/install_lib.py
parentc6340e42c8a06a35048659d7178efb329cda3249 (diff)
downloadexternal_python_setuptools-b908527864443899b89cf568ac9397aef7ad16c9.tar.gz
external_python_setuptools-b908527864443899b89cf568ac9397aef7ad16c9.tar.bz2
external_python_setuptools-b908527864443899b89cf568ac9397aef7ad16c9.zip
Use itertools.product for a cross-product of two iterables
Diffstat (limited to 'setuptools/command/install_lib.py')
-rw-r--r--setuptools/command/install_lib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py
index 371a9e72..c2730568 100644
--- a/setuptools/command/install_lib.py
+++ b/setuptools/command/install_lib.py
@@ -1,5 +1,6 @@
import distutils.command.install_lib as orig
import os, imp
+from itertools import product
class install_lib(orig.install_lib):
"""Don't add compiled flags to filenames of non-Python files"""
@@ -23,9 +24,8 @@ class install_lib(orig.install_lib):
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))
+ for pkg, f in product(all_packages, self._gen_exclude_names()):
+ exclude.add(os.path.join(pkg_path(pkg), f))
return exclude
@staticmethod