aboutsummaryrefslogtreecommitdiffstats
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
commite301ab4639508fd7d9d4a3beb51974d211d1c109 (patch)
tree286fd39974c450b8c342fc86e5df0026ca6125f1
parent86f35df37c309d2192a95259e77c6b4ba7f73876 (diff)
downloadexternal_python_setuptools-e301ab4639508fd7d9d4a3beb51974d211d1c109.tar.gz
external_python_setuptools-e301ab4639508fd7d9d4a3beb51974d211d1c109.tar.bz2
external_python_setuptools-e301ab4639508fd7d9d4a3beb51974d211d1c109.zip
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).