If I try install sip or PyQt with MinGW + MSYS, I recive error:
sip>mingw32-make install
mingw32-make.EXE[1]: Entering directory `D:/Lang/qt/sip/sipgen'
makefile:29: warning: overriding commands for target `.c.o'
makefile:26: warning: ignoring old commands for target `.c.o'
/bin/sh: -c: line 1: syntax error: unexpected end of file
mingw32-make.EXE[1]: *** [install] Error 258
mingw32-make.EXE[1]: Leaving directory `D:/Lang/qt/sip/sipgen'
mingw32-make.EXE: *** [install] Error 2
siputils.py.diff - Path for correct
Index: siputils.py
===================================================================
--- siputils.py (revision 163)
+++ siputils.py (working copy)
@@ -282,7 +293,10 @@
self.extra_libs = []
# Get these once and make them available to sub-classes.
- if sys.platform == "win32":
+ #if sys.platform == "win32":
+ MINGW_SH = (
+ self.generator == "MINGW" and os.system('sh --version > nul') == 0)
+ if sys.platform == "win32" and not MINGW_SH:
def_copy = "copy"
def_rm = "del"
def_mkdir = "mkdir"
@@ -293,10 +307,16 @@
def_mkdir = "mkdir -p"
def_chk_dir_exists = "test -d"
- self.copy = self.optional_string("COPY", def_copy)
- self.rm = self.optional_string("DEL_FILE", def_rm)
- self.mkdir = self.optional_string("MKDIR", def_mkdir)
- self.chkdir = self.optional_string("CHK_DIR_EXISTS", def_chk_dir_exists)
+ if not MINGW_SH:
+ self.copy = self.optional_string("COPY", def_copy)
+ self.rm = self.optional_string("DEL_FILE", def_rm)
+ self.mkdir = self.optional_string("MKDIR", def_mkdir)
+ self.chkdir = self.optional_string("CHK_DIR_EXISTS", def_chk_dir_exists)
+ else:
+ self.copy = def_copy
+ self.rm = def_rm
+ self.mkdir = def_mkdir
+ self.chkdir = def_chk_dir_exists
def finalise(self):
@@ -1085,12 +1126,18 @@
if self.generator == "UNIX":
dst = "$(DESTDIR)" + dst
- mfile.write("[EMAIL PROTECTED] %s " % (self.chkdir, _quote(dst)))
+ MINGW_SH = (
+ self.generator == "MINGW" and os.system('sh --version > nul') == 0)
+ if MINGW_SH:
+ quote2 = lambda name: _quote(name.replace('\\', '/'))
- if self.generator == "UNIX":
+ mfile.write("[EMAIL PROTECTED] %s " % (self.chkdir, quote2(dst)))
+
+ #if self.generator == "UNIX":
+ if self.generator == "UNIX" or MINGW_SH:
mfile.write("|| ")
- mfile.write("%s %s\n" % (self.mkdir, _quote(dst)))
+ mfile.write("%s %s\n" % (self.mkdir, quote2(dst)))
if type(src) != types.ListType:
src = [src]
@@ -1103,9 +1150,9 @@
strip = 0
for sf in src:
- target = _quote(os.path.join(dst, os.path.basename(sf)))
+ target = quote2(os.path.join(dst, os.path.basename(sf)))
- mfile.write("\t%s %s %s\n" % (self.copy, _quote(sf), target))
+ mfile.write("\t%s %s %s\n" % (self.copy, quote2(sf), target))
if strip:
mfile.write("\t%s %s\n" % (strip_cmd, target))
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt