diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2014-03-23 11:24:40 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-03-23 11:24:40 -0400 |
| commit | b3bf461294d6730617a04e2e6191c14e6a66d79e (patch) | |
| tree | f087f30cb1ee3e74242a2c218e413567b36d426b /setuptools/__init__.py | |
| parent | d7cb8f24e3ba0a39adf1a94d29caf9d26184840b (diff) | |
| download | python-setuptools-git-b3bf461294d6730617a04e2e6191c14e6a66d79e.tar.gz | |
Move the transform operation into the generator expression.
Diffstat (limited to 'setuptools/__init__.py')
| -rw-r--r-- | setuptools/__init__.py | 6 |
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): |
