diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-09-26 10:46:14 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-09-26 10:46:14 -0400 |
commit | 0306d5206bc40959af44055e3c28c5aabcebc6c1 (patch) | |
tree | 318e41a9764257830f08e9a9785e39aced64298a | |
parent | 856231494f5b5df2b105c7275221c6ef17ddaa6d (diff) | |
download | python-setuptools-bitbucket-0306d5206bc40959af44055e3c28c5aabcebc6c1.tar.gz |
Use itertools.product for a cross-product of two iterables
-rw-r--r-- | setuptools/command/install_lib.py | 6 |
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 |