77 lines
2.9 KiB
Diff
77 lines
2.9 KiB
Diff
--- a/wxPython/config.py.orig 2014-09-30 12:22:14.187740300 +0400
|
|
+++ a/wxPython/config.py 2014-09-30 12:35:39.236109800 +0400
|
|
@@ -311,10 +311,15 @@
|
|
flags += ' --version=%s.%s' % (VER_MAJOR, VER_MINOR)
|
|
|
|
searchpath = os.environ["PATH"]
|
|
- for p in searchpath.split(':'):
|
|
+ if sys.platform == 'win32':
|
|
+ psplit = ';'
|
|
+ else:
|
|
+ psplit = ':'
|
|
+ for p in searchpath.split(psplit):
|
|
fp = os.path.join(p, 'wx-config')
|
|
if os.path.exists(fp) and os.access(fp, os.X_OK):
|
|
# success
|
|
+ fp = fp.replace("\\", "/")
|
|
msg("Found wx-config: " + fp)
|
|
msg(" Using flags: " + flags)
|
|
WX_CONFIG = fp + flags
|
|
@@ -330,7 +335,7 @@
|
|
|
|
|
|
def getWxConfigValue(flag):
|
|
- cmd = "%s --version=%s.%s %s" % (WX_CONFIG, VER_MAJOR, VER_MINOR, flag)
|
|
+ cmd = "%s \"%s --version=%s.%s %s\"" % ("sh -c", WX_CONFIG, VER_MAJOR, VER_MINOR, flag)
|
|
value = os.popen(cmd, 'r').read()[:-1]
|
|
return value
|
|
|
|
@@ -511,7 +511,7 @@
|
|
distutils.command.install_headers.install_headers.finalize_options(self)
|
|
|
|
def run(self):
|
|
- if os.name == 'nt':
|
|
+ if os.name == 'nt' and not "MSYSTEM" in os.environ:
|
|
return
|
|
headers = self.distribution.headers
|
|
if not headers:
|
|
@@ -602,7 +602,7 @@
|
|
def findLib(name, libdirs):
|
|
name = makeLibName(name)[0]
|
|
if os.name == 'posix' or COMPILER == 'mingw32':
|
|
- lflags = getWxConfigValue('--libs')
|
|
+ lflags = getWxConfigValue('--libs all')
|
|
lflags = lflags.split()
|
|
|
|
# if wx-config --libs output does not start with -L, wx is
|
|
@@ -856,14 +861,16 @@
|
|
# gcc needs '.res' and '.rc' compiled to object files !!!
|
|
try:
|
|
#self.spawn(["windres", "-i", src, "-o", obj])
|
|
- self.spawn(["windres", "-i", src, "-o", obj] +
|
|
- [arg for arg in cc_args if arg.startswith("-I")] )
|
|
+ windresflags = getWxConfigValue('--rescomp')
|
|
+ windresflags = windresflags.split()
|
|
+ self.spawn(['sh', '-c', ' '.join(windresflags + ["-i", src, "-o", obj] +
|
|
+ [arg for arg in cc_args if arg.startswith("-I")]).replace("\\", "/")])
|
|
except DistutilsExecError, msg:
|
|
raise CompileError, msg
|
|
else: # for other files use the C-compiler
|
|
try:
|
|
- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
|
|
- extra_postargs)
|
|
+ self.spawn(['sh', '-c', ' '.join(self.compiler_so + cc_args + [src, '-o', obj] +
|
|
+ extra_postargs).replace("\\", "/")])
|
|
except DistutilsExecError, msg:
|
|
raise CompileError, msg
|
|
|
|
@@ -1046,7 +1046,7 @@
|
|
else:
|
|
cflags.append('-O3')
|
|
|
|
- lflags = getWxConfigValue('--libs')
|
|
+ lflags = getWxConfigValue('--libs all')
|
|
MONOLITHIC = (lflags.find("_xrc") == -1)
|
|
lflags = lflags.split()
|
|
|