diff options
author | PJ Eby <distutils-sig@python.org> | 2006-03-29 22:23:38 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2006-03-29 22:23:38 +0000 |
commit | 97d43ce576112fdda6d2fa1cecf4b46cc85b04c2 (patch) | |
tree | 330079c8200da94611150276df8d6f578352600c /setuptools/command/sdist.py | |
parent | 529b06d3717fdeb6a2070fa69b5c13cf0dff679f (diff) | |
download | external_python_setuptools-97d43ce576112fdda6d2fa1cecf4b46cc85b04c2.tar.gz external_python_setuptools-97d43ce576112fdda6d2fa1cecf4b46cc85b04c2.tar.bz2 external_python_setuptools-97d43ce576112fdda6d2fa1cecf4b46cc85b04c2.zip |
Added ``setuptools.file_finders`` entry point group to allow implementing
revision control plugins.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4043428
Diffstat (limited to 'setuptools/command/sdist.py')
-rwxr-xr-x | setuptools/command/sdist.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 9a0ea032..6026a7c2 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -1,6 +1,6 @@ from distutils.command.sdist import sdist as _sdist from distutils.util import convert_path -import os, re, sys +import os, re, sys, pkg_resources entities = [ ("<","<"), (">", ">"), (""", '"'), ("'", "'"), @@ -39,13 +39,13 @@ def joinpath(prefix,suffix): -def walk_revctrl(dirname='', memo=None): +def walk_revctrl(dirname=''): """Find all files under revision control""" - if memo is None: - memo = {} - if dirname in memo: - # Don't rescan a scanned directory - return + for ep in pkg_resources.iter_entry_points('setuptools.file_finders'): + for item in ep.load()(dirname): + yield item + +def _default_revctrl(dirname=''): for path, finder in finders: path = joinpath(dirname,path) if os.path.isfile(path): @@ -53,7 +53,7 @@ def walk_revctrl(dirname='', memo=None): if os.path.isfile(path): yield path elif os.path.isdir(path): - for item in walk_revctrl(path, memo): + for item in _default_revctrl(path): yield item def externals_finder(dirname, filename): |