Commit 199ade4a authored by Sidnei da Silva's avatar Sidnei da Silva

Ignore CVS and also .svn directories

parent 0c3dd3ab
...@@ -1122,7 +1122,9 @@ EXTS = ['.conf', '.css', '.dtd', '.gif', '.jpg', '.html', ...@@ -1122,7 +1122,9 @@ EXTS = ['.conf', '.css', '.dtd', '.gif', '.jpg', '.html',
'.js', '.mo', '.png', '.pt', '.stx', '.ref', '.js', '.mo', '.png', '.pt', '.stx', '.ref',
'.txt', '.xml', '.zcml', '.mar', '.in', '.sample', '.txt', '.xml', '.zcml', '.mar', '.in', '.sample',
] ]
IGNORE_NAMES = (
'CVS', '.svn', # Revision Control Directories
)
# This class serves multiple purposes. It walks the file system looking for # This class serves multiple purposes. It walks the file system looking for
# auxiliary files that distutils doesn't install properly, and it actually # auxiliary files that distutils doesn't install properly, and it actually
...@@ -1141,6 +1143,10 @@ class Finder: ...@@ -1141,6 +1143,10 @@ class Finder:
self._plen = len(prefix) + 1 self._plen = len(prefix) + 1
def visit(self, ignore, dir, files): def visit(self, ignore, dir, files):
# Remove ignored filenames
for ignore in IGNORE_NAMES:
if ignore in files:
files.remove(ignore)
for file in files: for file in files:
# First see if this is one of the packages we want to add, or if # First see if this is one of the packages we want to add, or if
# we're really skipping this package. # we're really skipping this package.
...@@ -1319,8 +1325,9 @@ distutils.core.setup( ...@@ -1319,8 +1325,9 @@ distutils.core.setup(
os.chdir(BASE_DIR) os.chdir(BASE_DIR)
def skel_visit(skel, dirname, names): def skel_visit(skel, dirname, names):
if "CVS" in names: for ignore in IGNORE_NAMES:
names.remove("CVS") if ignore in names:
names.remove(ignore)
L = [] L = []
for name in names: for name in names:
if os.path.isfile(os.path.join(dirname, name)): if os.path.isfile(os.path.join(dirname, name)):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment