]> git.saurik.com Git - wxWidgets.git/commitdiff
Install headers to the new location, use the new wx-config options
authorRobin Dunn <robin@alldunn.com>
Thu, 22 Jul 2004 18:15:18 +0000 (18:15 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 22 Jul 2004 18:15:18 +0000 (18:15 +0000)
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

wxPython/config.py
wxPython/setup.py

index 4e59bd278f99cd5740c2a8bf385974e9b760af23..f522db9e2080171ab424ced38d9e8468edfdecca 100644 (file)
@@ -38,7 +38,7 @@ import distutils.command.clean
 VER_MAJOR        = 2      # The first three must match wxWidgets
 VER_MINOR        = 5
 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.
 
 DESCRIPTION      = "Cross platform GUI toolkit for Python"
@@ -246,42 +246,35 @@ sys.argv = filter(None, sys.argv)
 #----------------------------------------------------------------------
 
 def Verify_WX_CONFIG():
-    """ Called below for the builds that need wx-config,
-        if WX_CONFIG is not set then tries to select the specific
-        wx*-config script based on build options.  If not found
-        then it defaults to 'wx-config'.
+    """ Called below for the builds that need wx-config, if WX_CONFIG
+        is not set then determins the flags needed based on build
+        options and searches for wx-config on the PATH.  
     """
     # if WX_CONFIG hasn't been set to an explicit value then construct one.
     global WX_CONFIG
     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
         if port == "x11":
             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"]
         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):
                 # success
                 msg("Found wx-config: " + fp)
-                WX_CONFIG = fp
+                msg("    Using flags: " + flags)
+                WX_CONFIG = fp + flags
                 break
         else:
-            msg("WX_CONFIG not specified and %s not found on $PATH "
-                  "defaulting to \"wx-config\"" % WX_CONFIG)
-            WX_CONFIG = 'wx-config'
-
+            msg("ERROR: WX_CONFIG not specified and wx-config not found on the $PATH")
+            # should we exit?
 
+        # TODO:  exeucte WX_CONFIG --list and verify a matching config is found
+        
 
 def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args,
              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):
             root = ''
         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)
             (out, _) = self.copy_file(header, install_dir)
             self.outfiles.append(out)
index 63c3f232023b95a09b775539d7104d774c174b2c..b5b17e937dedb25b32990ce5e52987716e4d57f9 100755 (executable)
@@ -435,7 +435,7 @@ if BUILD_STC:
     if os.name == 'nt':
         STC_H = opj(WXDIR, 'contrib', 'include/wx/stc')
     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...
 
@@ -671,8 +671,9 @@ else:
               glob.glob(opj("src/_*.py")) + \
               glob.glob(opj("src/*.swg"))
 
-    HEADERS = zip(h_files, ["/include/wx/wxPython"]*len(h_files)) + \
-              zip(i_files, ["/include/wx/wxPython/i_files"]*len(i_files))
+    HEADERS = zip(h_files, ["/wxPython"]*len(h_files)) + \
+              zip(i_files, ["/wxPython/i_files"]*len(i_files))
+
 
 #----------------------------------------------------------------------
 # Do the Setup/Build/Install/Whatever