[PyQt] [PATCH] sipconfig's PythonModuleMakefile: avoid SCM
directories
Giovanni Bajo
rasky at develer.com
Fri Oct 26 16:40:29 BST 2007
Hi,
sipconfig.py has a class PythonModuleMakefile that generates a Makefile
for a Python package/module. When using it over my project, it is common
that such package/module is under a SCM. In that case,
PythonModuleMakefile will generate a Makefile that will also install
SCM's private directories in the working copy.
This is a little unconvenient. The attached patch teaches
PythonModuleMakefile about skipping ".svn" and "CVS" directories.
setuptools/distutils have similar support.
Phil, is this patch OK with you?
--
Giovanni Bajo
-------------- next part --------------
Index: siputils.py
===================================================================
--- siputils.py (revision 14550)
+++ siputils.py (working copy)
@@ -1232,10 +1232,15 @@
tail = dirname[len(self._moddir):]
flist = []
- for f in names:
+ for f in list(names):
# Ignore certain files.
if f in ("Makefile", ):
continue
+
+ # Do not recurse into certain directories.
+ if f in (".svn", "CVS"):
+ names.remove(f)
+ continue
if os.path.isfile(os.path.join(dirname, f)):
flist.append(os.path.join(self._srcdir + tail, f))
More information about the PyQt
mailing list