summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-09-26 10:59:09 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-09-26 10:59:09 -0400
commitd2fce58956198d5d7d3b3a81f4d9cda5df6c0921 (patch)
tree8f9b81bb0131dc9f936bb8e34d860da5533d3e74
parent4d538558d0d5744a18a67ead585583771f6cb795 (diff)
downloadpython-setuptools-bitbucket-d2fce58956198d5d7d3b3a81f4d9cda5df6c0921.tar.gz
Move inline function into an instance method and rename for clarity.
-rw-r--r--setuptools/command/install_lib.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py
index dcd85dec..3cd16a8f 100644
--- a/setuptools/command/install_lib.py
+++ b/setuptools/command/install_lib.py
@@ -18,22 +18,22 @@ class install_lib(orig.install_lib):
Return a collections.Sized collections.Container of paths to be
excluded for single_version_externally_managed installations.
"""
- def _exclude(pkg, exclusion_path):
- """
- Given a package name and exclusion path within that package,
- compute the full 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)
)
- excl_specs = product(all_packages, self._gen_exclude_names())
- return set(starmap(_exclude, excl_specs))
+ excl_specs = product(all_packages, self._gen_exclusion_paths())
+ return set(starmap(self._exclude_pkg_path, excl_specs))
+
+ def _exclude_pkg_path(self, pkg, exclusion_path):
+ """
+ Given a package name and exclusion path within that package,
+ compute the full exclusion path.
+ """
+ parts = pkg.split('.') + [exclusion_path]
+ return os.path.join(self.install_dir, *parts)
@staticmethod
def _all_packages(pkg_name):
@@ -62,7 +62,7 @@ class install_lib(orig.install_lib):
return self.distribution.namespace_packages if svem else []
@staticmethod
- def _gen_exclude_names():
+ def _gen_exclusion_paths():
"""
Generate file paths to be excluded for namespace packages (bytecode
cache files).