summaryrefslogtreecommitdiff
path: root/setuptools
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-03-23 11:24:40 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-03-23 11:24:40 -0400
commitb3bf461294d6730617a04e2e6191c14e6a66d79e (patch)
treef087f30cb1ee3e74242a2c218e413567b36d426b /setuptools
parentd7cb8f24e3ba0a39adf1a94d29caf9d26184840b (diff)
downloadpython-setuptools-git-b3bf461294d6730617a04e2e6191c14e6a66d79e.tar.gz
Move the transform operation into the generator expression.
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/__init__.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py
index ab1541d7..6f588962 100644
--- a/setuptools/__init__.py
+++ b/setuptools/__init__.py
@@ -69,13 +69,11 @@ class PackageFinder(object):
def _find_packages_iter(cls, base_path):
dirs = cls._all_dirs(base_path)
suitable = filterfalse(lambda n: '.' in n, dirs)
- packages = (
- path
+ return (
+ path.replace(os.path.sep, '.')
for path in suitable
if cls._looks_like_package(os.path.join(base_path, path))
)
- for pkg_path in packages:
- yield pkg_path.replace(os.path.sep, '.')
@staticmethod
def _looks_like_package(path):