changeset 9129:395b0e132836

Don't copy hidden files/directories during `setup.py install` This is useful if a copy of Mercurial is stored in a Subversion repository so that the .svn directories don't get copied.
author James Abbatiello <abbeyj at gmail.com>
date Tue, 14 Jul 2009 22:42:05 -0400
parents 98d90ad54749
children 335f749cc369
files setup.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Fri Jul 10 13:40:25 2009 +0200
+++ b/setup.py	Tue Jul 14 22:42:05 2009 -0400
@@ -248,6 +248,8 @@
 datafiles = []
 for root in ('templates', 'i18n'):
     for dir, dirs, files in os.walk(root):
+        dirs[:] = [x for x in dirs if not x.startswith('.')]
+        files = [x for x in files if not x.startswith('.')]
         datafiles.append((os.path.join('mercurial', dir),
                           [os.path.join(dir, file_) for file_ in files]))