diff options
| author | Wyatt Lee Baldwin <self@wyattbaldwin.com> | 2014-02-12 00:52:26 -0800 |
|---|---|---|
| committer | Wyatt Lee Baldwin <self@wyattbaldwin.com> | 2014-02-12 00:52:26 -0800 |
| commit | c6669ca42c3e2afeb24660af404f72c606174353 (patch) | |
| tree | b618c56cc58f8d218bd4922cc7ba2c54471b6b42 /setuptools/__init__.py | |
| parent | f2bb3b0ab09da5fc1c186765052aea8fd87a9b2b (diff) | |
| download | python-setuptools-git-c6669ca42c3e2afeb24660af404f72c606174353.tar.gz | |
Setup find_packages excludes early for clarity.
--HG--
extra : rebase_source : 7c05859ef526ed8a2d9af738e54dc9dca510245e
Diffstat (limited to 'setuptools/__init__.py')
| -rw-r--r-- | setuptools/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py index fc9b7b93..d1288658 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -38,6 +38,7 @@ def find_packages(where='.', exclude=()): """ out = [] stack=[(convert_path(where), '')] + exclude = list(exclude) + ['ez_setup'] while stack: where,prefix = stack.pop(0) for name in os.listdir(where): @@ -50,7 +51,7 @@ def find_packages(where='.', exclude=()): if looks_like_package: out.append(prefix+name) stack.append((fn, prefix+name+'.')) - for pat in list(exclude)+['ez_setup']: + for pat in exclude: from fnmatch import fnmatchcase out = [item for item in out if not fnmatchcase(item,pat)] return out |
