wxPython: Fix headers installation. Rebuild.

This commit is contained in:
Alexey Pavlov
2016-09-24 12:45:19 +03:00
parent 03cd2e1d7c
commit cbabb1bd63
2 changed files with 39 additions and 12 deletions

View File

@@ -1,6 +1,14 @@
--- 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 @@
--- wxPython-src-3.0.2.0/wxPython/config.py.orig 2016-09-24 11:14:37.082854400 +0300
+++ wxPython-src-3.0.2.0/wxPython/config.py 2016-09-24 11:44:18.791290600 +0300
@@ -23,6 +23,7 @@
import sys, os, glob, fnmatch, tempfile
import subprocess
import re
+from sysconfig import _POSIX_BUILD
EGGing = 'bdist_egg' in sys.argv or 'egg_info' in sys.argv
if not EGGing:
@@ -311,10 +312,15 @@
flags += ' --version=%s.%s' % (VER_MAJOR, VER_MINOR)
searchpath = os.environ["PATH"]
@@ -17,7 +25,7 @@
msg("Found wx-config: " + fp)
msg(" Using flags: " + flags)
WX_CONFIG = fp + flags
@@ -330,7 +335,7 @@
@@ -330,7 +336,7 @@
def getWxConfigValue(flag):
@@ -26,7 +34,7 @@
value = os.popen(cmd, 'r').read()[:-1]
return value
@@ -511,7 +511,7 @@
@@ -506,21 +512,24 @@
distutils.command.install_headers.install_headers.finalize_options(self)
def run(self):
@@ -35,7 +43,26 @@
return
headers = self.distribution.headers
if not headers:
@@ -602,7 +602,7 @@
return
root = self.root
+ inst_prefix = WXPREFIX
+ if _POSIX_BUILD and "MSYSTEM" in os.environ:
+ inst_prefix = os.popen(' '.join(['cygpath', '--unix', inst_prefix])).readline().strip()
#print "WXPREFIX is %s, root is %s" % (WXPREFIX, root)
# hack for universal builds, which append i386/ppc
# to the root
- if root is None or WXPREFIX.startswith(os.path.dirname(root)):
+ if root is None or inst_prefix.startswith(os.path.dirname(root)):
root = ''
for header, location in headers:
install_dir = os.path.normpath(root +
- WXPREFIX +
+ inst_prefix +
'/include/wx-%d.%d/wx' % (VER_MAJOR, VER_MINOR) +
location)
self.mkpath(install_dir)
@@ -597,7 +606,7 @@
def findLib(name, libdirs):
name = makeLibName(name)[0]
if os.name == 'posix' or COMPILER == 'mingw32':
@@ -44,7 +71,7 @@
lflags = lflags.split()
# if wx-config --libs output does not start with -L, wx is
@@ -663,9 +663,11 @@
@@ -658,9 +667,11 @@
newLFLAGS = []
for flag in lflags:
if flag[:2] == '-L':
@@ -57,7 +84,7 @@
else:
newLFLAGS.append(flag)
return removeDuplicates(newLFLAGS)
@@ -856,14 +861,16 @@
@@ -856,14 +867,16 @@
# gcc needs '.res' and '.rc' compiled to object files !!!
try:
#self.spawn(["windres", "-i", src, "-o", obj])
@@ -78,7 +105,7 @@
except DistutilsExecError, msg:
raise CompileError, msg
@@ -1046,7 +1046,7 @@
@@ -1039,7 +1052,7 @@
else:
cflags.append('-O3')