From b925f19a4ef1b214650b770c74a083fc4f982758 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 26 Sep 2014 10:52:20 -0400 Subject: Incorporate the exclusion path in the _exclude function. --- setuptools/command/install_lib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'setuptools/command/install_lib.py') diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index cc531c01..f36d8651 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -19,14 +19,18 @@ class install_lib(orig.install_lib): excluded for single_version_externally_managed installations. """ exclude = set() - pkg_path = lambda pkg: os.path.join(self.install_dir, *pkg.split('.')) + + def _exclude(pkg, exclusion_path): + parts = pkg.split('.') + [exclusion_path] + return os.path.join(self.install_dir, *parts) + all_packages = ( pkg for ns_pkg in self._get_SVEM_NSPs() for pkg in self._all_packages(ns_pkg) ) for pkg, f in product(all_packages, self._gen_exclude_names()): - exclude.add(os.path.join(pkg_path(pkg), f)) + exclude.add(_exclude(pkg, f)) return exclude @staticmethod -- cgit v1.2.3