]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/setup.py
I keep running into situations where the old small default window size
[wxWidgets.git] / wxPython / setup.py
index 2f945984d7bd6c157f0da7d14f8bd82ea3cf01d6..685c9148289eb437654c58d029c2d73eae28fcd6 100755 (executable)
@@ -16,8 +16,8 @@ from distutils.command.install_data import install_data
 VER_MAJOR        = 2      # The first three must match wxWindows
 VER_MINOR        = 5
 VER_RELEASE      = 1
-VER_SUBREL       = 0      # wxPython release num for x.y.z release of wxWindows
-VER_FLAGS        = "p5"   # release flags, such as prerelease num, unicode, etc.
+VER_SUBREL       = 1      # wxPython release num for x.y.z release of wxWindows
+VER_FLAGS        = ""     # release flags, such as prerelease num, unicode, etc.
 
 DESCRIPTION      = "Cross platform GUI toolkit for Python"
 AUTHOR           = "Robin Dunn"
@@ -64,7 +64,7 @@ BUILD_DLLWIDGET = 0# Build a module that enables unknown wx widgets
                    # to be loaded from a DLL and to be used from Python.
 
                    # Internet Explorer wrapper (experimental)
-BUILD_IEWIN = 0 #(os.name == 'nt')
+BUILD_IEWIN = (os.name == 'nt')
 
 
 CORE_ONLY = 0      # if true, don't build any of the above
@@ -107,6 +107,7 @@ WXPORT = 'gtk'     # On Linux/Unix there are several ports of wxWindows availabl
 
 BUILD_BASE = "build"       # Directory to use for temporary build files.
 
+CONTRIBS_INC = ""  # A dir to add as an -I flag when compiling the contribs
 
 
 # Some MSW build settings
@@ -190,7 +191,8 @@ for flag in ['BUILD_GLCANVAS', 'BUILD_OGL', 'BUILD_STC', 'BUILD_XRC',
                 sys.argv[x] = ''
 
 # String options
-for option in ['WX_CONFIG', 'WXDLLVER', 'BUILD_BASE', 'WXPORT', 'SWIG']:
+for option in ['WX_CONFIG', 'WXDLLVER', 'BUILD_BASE', 'WXPORT', 'SWIG',
+               'CONTRIBS_INC']:
     for x in range(len(sys.argv)):
         if sys.argv[x].find(option) == 0:
             pos = sys.argv[x].find('=') + 1
@@ -223,7 +225,10 @@ def Verify_WX_CONFIG():
         else:
             uf = ''
         ver2 = "%s.%s" % (VER_MAJOR, VER_MINOR)
-        WX_CONFIG = 'wx%s%s%s-%s-config' % (WXPORT, uf, df, ver2)
+        port = WXPORT
+        if port == "x11":
+            port = "x11univ"
+        WX_CONFIG = 'wx%s%s%s-%s-config' % (port, uf, df, ver2)
 
         searchpath = os.environ["PATH"]
         for p in searchpath.split(':'):
@@ -466,6 +471,8 @@ if os.name == 'nt':
     if UNDEF_NDEBUG:
         defines.append( ('NDEBUG',) )  # using a 1-tuple makes it do an undef
 
+    if HYBRID:
+        defines.append( ('__NO_VC_CRTDBG__', None) )
 
     if not FINAL or HYBRID:
         defines.append( ('__WXDEBUG__', None) )
@@ -519,6 +526,13 @@ elif os.name == 'posix':
     libdirs = []
     libs = []
 
+    # If you get unresolved symbol errors on Solaris and are using gcc, then
+    # uncomment this block to add the right flags to the link step and build
+    # again.
+    ## if os.uname()[0] == 'SunOS':
+    ##     libs.append('gcc')
+    ##     libdirs.append(commands.getoutput("gcc -print-search-dirs | grep '^install' | awk '{print $2}'")[:-1])
+
     cflags = os.popen(WX_CONFIG + ' --cxxflags', 'r').read()[:-1]
     cflags = cflags.split()
     if debug:
@@ -579,7 +593,7 @@ elif os.name == 'posix':
 
 #----------------------------------------------------------------------
 else:
-    raise 'Sorry Charlie, platform not supported...'
+    raise 'Sorry, platform not supported...'
 
 
 #----------------------------------------------------------------------
@@ -682,6 +696,7 @@ swig_sources = run_swig(['core.i'], 'src', GENDIR, PKGDIR,
                           'src/_streams.i',
                           'src/_validator.i',
                           'src/_window.i',
+                          'src/_control.i',  
                           ])
 
 copy_file('src/__init__.py', PKGDIR, update=1, verbose=0)
@@ -787,7 +802,7 @@ wxpExtensions.append(ext)
 swig_sources = run_swig(['controls.i'], 'src', GENDIR, PKGDIR,
                         USE_SWIG, swig_force, swig_args, swig_deps +
                         [ 'src/_controls_rename.i',     'src/_controls_reverse.txt',
-                          'src/_control.i',             'src/_toolbar.i',
+                          'src/_toolbar.i',
                           'src/_button.i',              'src/_checkbox.i',
                           'src/_choice.i',              'src/_combobox.i',
                           'src/_gauge.i',               'src/_statctrls.i',
@@ -820,10 +835,10 @@ swig_sources = run_swig(['misc.i'], 'src', GENDIR, PKGDIR,
                           'src/_misc.i',          'src/_tipdlg.i',
                           'src/_timer.i',         'src/_log.i',
                           'src/_process.i',       'src/_joystick.i',
-                          'src/_wave.i',          'src/_mimetype.i',
+                          'src/_sound.i',         'src/_mimetype.i',
                           'src/_artprov.i',       'src/_config.i',
                           'src/_datetime.i',      'src/_dataobj.i',
-                          'src/_dnd.i',
+                          'src/_dnd.i',           'src/_display.i',
                           'src/_clipbrd.i',
                           ])
 ext = Extension('_misc', swig_sources,
@@ -901,8 +916,13 @@ ext = Extension('_wizard', swig_sources,
 wxpExtensions.append(ext)
 
 
+#----------------------------------------------------------------------
 
-
+if CONTRIBS_INC:
+    CONTRIBS_INC = [ CONTRIBS_INC ]
+else:
+    CONTRIBS_INC = []
+    
 
 #----------------------------------------------------------------------
 # Define the GLCanvas extension module
@@ -927,7 +947,7 @@ if BUILD_GLCANVAS:
     ext = Extension('_glcanvas',
                     swig_sources,
 
-                    include_dirs = includes,
+                    include_dirs = includes + CONTRIBS_INC,
                     define_macros = defines,
 
                     library_dirs = libdirs,
@@ -960,7 +980,7 @@ if BUILD_OGL:
     ext = Extension('_ogl',
                     swig_sources,
 
-                    include_dirs =  includes + [ location ],
+                    include_dirs =  includes + [ location ] + CONTRIBS_INC,
                     define_macros = defines + [('wxUSE_DEPRECATED', '0')],
 
                     library_dirs = libdirs,
@@ -986,7 +1006,7 @@ if BUILD_STC:
     else:
         STC_H = opj(WXPREFIX, 'include/wx/stc')
 
-## NOTE: need to add this to the stc.bkl...
+## NOTE: need to add something like this to the stc.bkl...
 
 ##         # Check if gen_iface needs to be run for the wxSTC sources
 ##         if (newer(opj(CTRB_SRC, 'stc/stc.h.in'),     opj(CTRB_INC, 'stc/stc.h'  )) or
@@ -1010,7 +1030,7 @@ if BUILD_STC:
     ext = Extension('_stc',
                     swig_sources,
 
-                    include_dirs = includes,
+                    include_dirs = includes + CONTRIBS_INC,
                     define_macros = defines,
 
                     library_dirs = libdirs,
@@ -1038,11 +1058,11 @@ if BUILD_IEWIN:
                             USE_SWIG, swig_force, swig_args, swig_deps)
 
 
-    ext = Extension('iewinc', ['%s/IEHtmlWin.cpp' % location,
+    ext = Extension('_iewin', ['%s/IEHtmlWin.cpp' % location,
                                '%s/wxactivex.cpp' % location,
                              ] + swig_sources,
 
-                    include_dirs =  includes,
+                    include_dirs =  includes + CONTRIBS_INC,
                     define_macros = defines,
 
                     library_dirs = libdirs,
@@ -1076,7 +1096,7 @@ if BUILD_XRC:
     ext = Extension('_xrc',
                     swig_sources,
 
-                    include_dirs =  includes,
+                    include_dirs =  includes + CONTRIBS_INC,
                     define_macros = defines,
 
                     library_dirs = libdirs,
@@ -1104,7 +1124,7 @@ if BUILD_GIZMOS:
     ext = Extension('_gizmos',
                     [ '%s/treelistctrl.cpp' % location ] + swig_sources,
 
-                    include_dirs =  includes + [ location ],
+                    include_dirs =  includes + [ location ] + CONTRIBS_INC,
                     define_macros = defines,
 
                     library_dirs = libdirs,
@@ -1137,7 +1157,7 @@ if BUILD_DLLWIDGET:
                                 '%s/dllwidget.cpp' % location,
                              ] + swig_sources,
 
-                    include_dirs =  includes,
+                    include_dirs =  includes + CONTRIBS_INC,
                     define_macros = defines,
 
                     library_dirs = libdirs,
@@ -1173,8 +1193,8 @@ else:
                ]
 
 
-DATA_FILES += find_data_files('wxPython/tools/XRCed', '*.txt', '*.xrc')
-DATA_FILES += find_data_files('wxPython/py', '*.txt', '*.ico', '*.css', '*.html')
+DATA_FILES += find_data_files('wx/tools/XRCed', '*.txt', '*.xrc')
+DATA_FILES += find_data_files('wx/py', '*.txt', '*.ico', '*.css', '*.html')
 DATA_FILES += find_data_files('wx', '*.txt', '*.css', '*.html')
 
 
@@ -1210,7 +1230,6 @@ if __name__ == "__main__":
                           'wx.lib.editor',
                           'wx.lib.mixins',
                           'wx.py',
-                          'wx.py.wxd',
                           'wx.tools',
                           'wx.tools.XRCed',
                           ],