[PATCH] Don't copy hidden files/directories during `setup.py install`
James Abbatiello
abbeyj at gmail.com
Wed Jul 15 02:52:55 UTC 2009
# HG changeset patch
# User James Abbatiello <abbeyj at gmail.com>
# Date 1247625725 14400
# Node ID 393c74219fb1253a7b6ebf90fbe087d8662abd35
# Parent ead71bffb136594e2212e6ee0e43ce018f16206c
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.
diff -r ead71bffb136 -r 393c74219fb1 setup.py
--- a/setup.py Tue Jul 14 22:38:12 2009 -0400
+++ 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]))
More information about the Mercurial-devel
mailing list