Install headers to the new location, use the new wx-config options
instead of building the wx-{toolchain}-config name myself, incremented the version number. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -38,7 +38,7 @@ import distutils.command.clean
|
|||||||
VER_MAJOR = 2 # The first three must match wxWidgets
|
VER_MAJOR = 2 # The first three must match wxWidgets
|
||||||
VER_MINOR = 5
|
VER_MINOR = 5
|
||||||
VER_RELEASE = 2
|
VER_RELEASE = 2
|
||||||
VER_SUBREL = 2 # wxPython release num for x.y.z release of wxWidgets
|
VER_SUBREL = 3 # wxPython release num for x.y.z release of wxWidgets
|
||||||
VER_FLAGS = "p" # release flags, such as prerelease num, unicode, etc.
|
VER_FLAGS = "p" # release flags, such as prerelease num, unicode, etc.
|
||||||
|
|
||||||
DESCRIPTION = "Cross platform GUI toolkit for Python"
|
DESCRIPTION = "Cross platform GUI toolkit for Python"
|
||||||
@@ -246,42 +246,35 @@ sys.argv = filter(None, sys.argv)
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
def Verify_WX_CONFIG():
|
def Verify_WX_CONFIG():
|
||||||
""" Called below for the builds that need wx-config,
|
""" Called below for the builds that need wx-config, if WX_CONFIG
|
||||||
if WX_CONFIG is not set then tries to select the specific
|
is not set then determins the flags needed based on build
|
||||||
wx*-config script based on build options. If not found
|
options and searches for wx-config on the PATH.
|
||||||
then it defaults to 'wx-config'.
|
|
||||||
"""
|
"""
|
||||||
# if WX_CONFIG hasn't been set to an explicit value then construct one.
|
# if WX_CONFIG hasn't been set to an explicit value then construct one.
|
||||||
global WX_CONFIG
|
global WX_CONFIG
|
||||||
if WX_CONFIG is None:
|
if WX_CONFIG is None:
|
||||||
if debug: # TODO: Fix this. wxPython's --debug shouldn't be tied to wxWidgets...
|
|
||||||
df = 'd'
|
|
||||||
else:
|
|
||||||
df = ''
|
|
||||||
if UNICODE:
|
|
||||||
uf = 'u'
|
|
||||||
else:
|
|
||||||
uf = ''
|
|
||||||
ver2 = "%s.%s" % (VER_MAJOR, VER_MINOR)
|
|
||||||
port = WXPORT
|
port = WXPORT
|
||||||
if port == "x11":
|
if port == "x11":
|
||||||
port = "x11univ"
|
port = "x11univ"
|
||||||
WX_CONFIG = 'wx%s%s%s-%s-config' % (port, uf, df, ver2)
|
flags = ' --toolkit=%s' % port
|
||||||
|
flags += ' --unicode=%s' % (UNICODE and 'yes' or 'no')
|
||||||
|
flags += ' --version=%s.%s' % (VER_MAJOR, VER_MINOR)
|
||||||
|
|
||||||
searchpath = os.environ["PATH"]
|
searchpath = os.environ["PATH"]
|
||||||
for p in searchpath.split(':'):
|
for p in searchpath.split(':'):
|
||||||
fp = os.path.join(p, WX_CONFIG)
|
fp = os.path.join(p, 'wx-config')
|
||||||
if os.path.exists(fp) and os.access(fp, os.X_OK):
|
if os.path.exists(fp) and os.access(fp, os.X_OK):
|
||||||
# success
|
# success
|
||||||
msg("Found wx-config: " + fp)
|
msg("Found wx-config: " + fp)
|
||||||
WX_CONFIG = fp
|
msg(" Using flags: " + flags)
|
||||||
|
WX_CONFIG = fp + flags
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
msg("WX_CONFIG not specified and %s not found on $PATH "
|
msg("ERROR: WX_CONFIG not specified and wx-config not found on the $PATH")
|
||||||
"defaulting to \"wx-config\"" % WX_CONFIG)
|
# should we exit?
|
||||||
WX_CONFIG = 'wx-config'
|
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: exeucte WX_CONFIG --list and verify a matching config is found
|
||||||
|
|
||||||
|
|
||||||
def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args,
|
def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args,
|
||||||
swig_deps=[], add_under=False):
|
swig_deps=[], add_under=False):
|
||||||
@@ -428,7 +421,10 @@ class wx_install_headers(distutils.command.install_headers.install_headers):
|
|||||||
if root is None or WXPREFIX.startswith(root):
|
if root is None or WXPREFIX.startswith(root):
|
||||||
root = ''
|
root = ''
|
||||||
for header, location in headers:
|
for header, location in headers:
|
||||||
install_dir = os.path.normpath(root + WXPREFIX + location)
|
install_dir = os.path.normpath(root +
|
||||||
|
WXPREFIX +
|
||||||
|
'/include/wx-%d.%d/wx' % (VER_MAJOR, VER_MINOR) +
|
||||||
|
location)
|
||||||
self.mkpath(install_dir)
|
self.mkpath(install_dir)
|
||||||
(out, _) = self.copy_file(header, install_dir)
|
(out, _) = self.copy_file(header, install_dir)
|
||||||
self.outfiles.append(out)
|
self.outfiles.append(out)
|
||||||
|
@@ -435,7 +435,7 @@ if BUILD_STC:
|
|||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
STC_H = opj(WXDIR, 'contrib', 'include/wx/stc')
|
STC_H = opj(WXDIR, 'contrib', 'include/wx/stc')
|
||||||
else:
|
else:
|
||||||
STC_H = opj(WXPREFIX, 'include/wx/stc')
|
STC_H = opj(WXPREFIX, 'include/wx-%d.%d/wx/stc' % (VER_MAJOR, VER_MINOR))
|
||||||
|
|
||||||
## NOTE: need to add something like this to the stc.bkl...
|
## NOTE: need to add something like this to the stc.bkl...
|
||||||
|
|
||||||
@@ -671,8 +671,9 @@ else:
|
|||||||
glob.glob(opj("src/_*.py")) + \
|
glob.glob(opj("src/_*.py")) + \
|
||||||
glob.glob(opj("src/*.swg"))
|
glob.glob(opj("src/*.swg"))
|
||||||
|
|
||||||
HEADERS = zip(h_files, ["/include/wx/wxPython"]*len(h_files)) + \
|
HEADERS = zip(h_files, ["/wxPython"]*len(h_files)) + \
|
||||||
zip(i_files, ["/include/wx/wxPython/i_files"]*len(i_files))
|
zip(i_files, ["/wxPython/i_files"]*len(i_files))
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
# Do the Setup/Build/Install/Whatever
|
# Do the Setup/Build/Install/Whatever
|
||||||
|
Reference in New Issue
Block a user