]> git.saurik.com Git - wxWidgets.git/commitdiff
Build and distrib tweaks ported over from the 2.6 branch
authorRobin Dunn <robin@alldunn.com>
Wed, 5 Jul 2006 05:23:28 +0000 (05:23 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 5 Jul 2006 05:23:28 +0000 (05:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

24 files changed:
wxPython/config.py
wxPython/distrib/DIRLIST
wxPython/distrib/all/build-all
wxPython/distrib/all/build-docs
wxPython/distrib/all/build-environ.cfg
wxPython/distrib/all/build-finalize
wxPython/distrib/all/build-osx
wxPython/distrib/all/build-rpm
wxPython/distrib/all/build-setup
wxPython/distrib/all/build-sources
wxPython/distrib/all/build-windows
wxPython/distrib/all/do-build-osx
wxPython/distrib/all/do-build-windows
wxPython/distrib/all/taskrunner.py
wxPython/distrib/build_packages.sh
wxPython/distrib/mac/wxPythonOSX/build
wxPython/distrib/make_installer.py
wxPython/distrib/make_installer_inno4.py
wxPython/distrib/makerpm
wxPython/distrib/wxPythonFull.spec.in
wxPython/scripts/CreateMacScripts.py
wxPython/setup.py
wxPython/wxaddons/__init__.py [new file with mode: 0644]
wxPython/wxaddons/setup.py [new file with mode: 0644]

index b212052218909374ce22ec5347eecc879b5621f1..d52eb5961bacc06ebff874045a3260796a89558c 100644 (file)
@@ -585,7 +585,11 @@ def adjustLFLAGS(lflags, libdirs, libs):
         else:
             newLFLAGS.append(flag)
 
-    return newLFLAGS
+    # remove any flags for universal binaries, we'll get those from
+    # distutils instead
+    return [flag for flag in newLFLAGS
+            if flag not in ['-isysroot', '-arch', 'ppc', 'i386'] and
+            not flag.startswith('/Developer') ]
 
 
 
index a43256e2c620408887f856a29ab91197dc746218..29064ba4fe16a44d9a7293e431bddc7a004594e5 100644 (file)
@@ -97,6 +97,7 @@ wxPython/wx/py/tests
 wxPython/wx/tools
 wxPython/wx/tools/XRCed
 wxPython/wx/tools/XRCed/src-images
+wxPython/wxaddons
 wxPython/wxPython
 wxPython/wxPython/lib
 wxPython/wxPython/lib/colourchooser
index 1221be37ce2daec2578e6d9a13df8c8a110508cc..dde73c9a0695125db1b8c9f41bd9602e8019ddb2 100755 (executable)
@@ -40,53 +40,58 @@ class Job(Job):
 def getTasks(config_env):
     # Things that need to be done before any of the builds
     initialTask = Task([
-        Job("cleanup", "distrib/all/build-setup", env=config_env),
-        Job("makedocs", "distrib/all/build-docs", env=config_env),
-        Job("maketarball", "distrib/all/build-sources", env=config_env),
+        Job("", "distrib/all/build-setup", env=config_env),
+        Job("", "distrib/all/build-docs", env=config_env),
+        Job("", "distrib/all/build-sources", env=config_env),
         ])
     
     # Build tasks.  Anything that can be done in parallel (depends greatly
     # on the nature of the build machines configurations...) is a separate
     # task.
     
-    jaguarTask =  Task(
-        Job("whopper.23",
-            "distrib/all/build-osx", [config.OSX_HOST_jaguar, "jaguar", "2.3"], env=config_env) )
+    jaguarTask = Task( Job("whopper.23", "distrib/all/build-osx",
+                           [config.OSX_HOST_jaguar, "2.3", "ansi"], env=config_env) )
     
-    pantherTask =  Task(
-        [ Job("bigmac.23", 
-              "distrib/all/build-osx", [config.OSX_HOST_panther, "panther", "2.3"], env=config_env),
-          Job("bigmac.24",
-              "distrib/all/build-osx", [config.OSX_HOST_panther, "panther", "2.4"], env=config_env)
-          ])
+    pantherTask = Task( [ Job("bigmac.23", 
+                              "distrib/all/build-osx",
+                              [config.OSX_HOST_panther, "2.3", "both"], env=config_env),
+                          Job("bigmac.24",
+                              "distrib/all/build-osx",
+                              [config.OSX_HOST_panther, "2.4", "both"], env=config_env)
+                          ])
+
+    tigerTask =  Task([ #Job("smallfry.23",
+                        #    "distrib/all/build-osx",
+                        #    [config.OSX_HOST_tiger, "2.3", "both"], env=config_env),
+                        Job("smallfry.24",
+                            "distrib/all/build-osx",
+                            [config.OSX_HOST_tiger, "2.4", "both", "universal"], env=config_env),
+                        Job("smallfry.25",
+                            "distrib/all/build-osx",
+                            [config.OSX_HOST_tiger, "2.5", "both", "universal"], env=config_env)
+                    ])
+
     
     beastTask1 = Task(
         [ Job("beast.23",     "distrib/all/build-windows", ["2.3"], env=config_env),
-          Job("co-rh9.23",    ["distrib/all/build-rpm", CFGFILE, "beast", "co-rh9",   "rh9",   "2.3"]),
+          Job("co-rh9.23",    "distrib/all/build-rpm", ["beast", "co-rh9",   "rh9",   "2.3"], env=config_env),
           Job("beast.24",     "distrib/all/build-windows", ["2.4"], env=config_env),
-          Job("co-rh9.24",    ["distrib/all/build-rpm", CFGFILE, "beast", "co-rh9",   "rh9",   "2.4"]),
+          Job("co-rh9.24",    "distrib/all/build-rpm", ["beast", "co-rh9",   "rh9",   "2.4"], env=config_env),
+          Job("beast.25",     "distrib/all/build-windows", ["2.5"], env=config_env),
           ])
     
     beastTask2 = Task(
-        [ Job("co-fc2.23",    ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc2",   "fc2",   "2.3"]),
-          #Job("co-mdk101.23", ["distrib/all/build-rpm", CFGFILE, "beast", "co-mdk101","mdk101","2.3"]),
-          Job("co-fc4.24",    ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc4",   "fc4",   "2.4"]),
-          #Job("co-fc2.24",    ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc2",   "fc2",   "2.4"]),
-          Job("co-mdk102.24", ["distrib/all/build-rpm", CFGFILE, "beast", "co-mdk102","mdk102","2.4"]),
+        [ Job("co-fc2.23",    "distrib/all/build-rpm", ["beast", "co-fc2",     "fc2",     "2.3"], env=config_env),
+          Job("co-fc4.24",    "distrib/all/build-rpm", ["beast", "co-fc4",     "fc4",     "2.4"], env=config_env),
+          Job("co-mdk102.24", "distrib/all/build-rpm", ["beast", "co-mdk102",  "mdk102",  "2.4"], env=config_env),
+          Job("co-mdk2006.24","distrib/all/build-rpm", ["beast", "co-mdk2006", "mdk2006", "2.4"], env=config_env),
           ])
 
-##     cyclopsTask = Task(
-##         [ Job("co-mdk92.23",  "distrib/all/build-rpm", ["cyclops", "co-mdk92", "mdk92", "2.3"], env=config_env),
-##           Job("co-rh9.23",    "distrib/all/build-rpm", ["cyclops", "co-rh9",   "rh9",   "2.3"], env=config_env),
-##           Job("co-mdk92.24",  "distrib/all/build-rpm", ["cyclops", "co-mdk92", "mdk92", "2.4"], env=config_env),
-##           Job("co-rh9.24",    "distrib/all/build-rpm", ["cyclops", "co-rh9",   "rh9",   "2.4"], env=config_env),
-##           ])
-    
     buildTasks = [ jaguarTask,
                    pantherTask,
+                   tigerTask,
                    beastTask1,
                    beastTask2,
-##                    cyclopsTask,
                    ]
     
     # Finalization.  This is for things that must wait until all the
index d7ae7b67eb89bb94e4fb03664ede5ef4f8699d5a..8af81f3466ee47989656b278a9211ae7bec7c066 100755 (executable)
@@ -3,12 +3,6 @@
 
 set -o errexit
 
-set
-
-# read the config variables from the file given on the command line
-# . $1
-
-
 if [ $skipdocs != yes ]; then 
     # Regenerate the reST docs
     echo "Regenerating the reST docs..."
index c8e4c70867df3bc5aefbbce517571bc1b5a79a63..eb3e7dc040bdb2ea8cbd0551d4836c180fe4aa4d 100644 (file)
@@ -1,36 +1,42 @@
 
-skipnewdocs="no"
+# the local spot that we put everything when done, before copying 
+# to remote hosts
+STAGING_DIR = ./BUILD
 
-# Just like the above
-OSX_HOST_panther="bigmac"
-OSX_HOST_jaguar="whopper"
-OSX_BUILD="/BUILD"
 
-# Alsmost the same...  See below for hosts and other info
-LINUX_BUILD="/tmp/BUILD"
+# host name of the machine to use for windows builds
+WIN_HOST = beast
+# Where is the build dir from the remote machine's perspective?
+WIN_BUILD = /c/BUILD
 
-# the local spot that we put everything when done, before possibly copying 
-# to remote hosts
-STAGING_DIR="./BUILD"
-UPLOAD_DAILY_ROOT="/home/crew/robind/public_html/wxPython/daily"
 
-# host name of the machine to use for windows builds
-WIN_HOST="beast"
+# Just like the above
+OSX_HOST_tiger = smallfry
+OSX_HOST_panther = bigmac
+OSX_HOST_jaguar = whopper
+OSX_BUILD = /BUILD
+
+
+# Almost the same...  Hosts and other info comes from the Job
+# descriptions in this case
+LINUX_BUILD = /tmp/BUILD
+
+
+# Upload server locations
+UPLOAD_HOST = starship.python.net
+UPLOAD_DAILY_ROOT = /home/crew/robind/public_html/wxPython/daily
+UPLOAD_PREVIEW_ROOT = /home/crew/robind/public_html/wxPython/rc
+
+# defaults for build options
+KIND = dryrun
+skipsource = no
+onlysource = no
+skipdocs = no
+skipwin = no
+skiposx = no
+skiplinux = no
+skipclean = no
+skipupload = no
+skipnewdocs = no
+startcohost = yes
 
-# Where is the build dir from the remote machine's perspective?
-WIN_BUILD="/c/BUILD"
-
-
-UPLOAD_HOST="starship.python.net"
-skipsource="no"
-KIND="dryrun"
-UPLOAD_PREVIEW_ROOT="/home/crew/robind/public_html/wxPython/rc"
-skipclean="no"
-
-skipdocs="no"
-skipwin="no"
-skiplinux="no"
-skipupload="no"
-startcohost="yes"
-skiposx="no"
-onlysource="no"
index 4ce39615107f5f9379205ede49d75a0a44026164..1eddedd615ba9b9195c5535e26e823eb14a3058a 100755 (executable)
@@ -3,10 +3,6 @@
 
 set -o errexit
 
-# read the config variables from the file given on the command line
-# . $1
-
-
 
 
 chmod a+r $STAGING_DIR/*
index 1e667e335c15ff516a15fd93cc6c0cd4e32c951d..6c53d29d66e2def52b21646aafc0e4b4f0656cca 100755 (executable)
@@ -3,20 +3,18 @@
 
 set -o errexit
 
-# read the config variables from the file given on the command line
-# . $1
-
-
 host=$1
-flavor=$2
-pyver=$3
+pyver=$2
+chartype=$3
+flags=$4
+
 
 if [ $skiposx != yes ]; then
     # test if the target machine is online
     if ping -q -c1 -w1 $host > /dev/null; then
-       echo " The $host machine is online, OSX-$flavor build continuing..."
+       echo " The $host machine is online, OSX build continuing..."
     else
-       echo "The $host machine is **OFFLINE**, skipping the OSX-$flavor build."
+       echo "The $host machine is **OFFLINE**, skipping the OSX build."
        exit 0
     fi
 
@@ -32,7 +30,7 @@ if [ $skiposx != yes ]; then
     echo "Running build script on $host..."
     wxdir=$OSX_BUILD/wxPython-src-$VERSION
     cmd=./do-build-osx
-    ssh root@$host "cd $OSX_BUILD && $cmd $wxdir $OSX_BUILD $skipclean $VERSION $flavor $pyver && rm $cmd"
+    ssh root@$host "cd $OSX_BUILD && $cmd $wxdir $OSX_BUILD $skipclean $VERSION $pyver $chartype $flags && rm $cmd"
     
     echo "Fetching the results..."
     scp "root@$host:$OSX_BUILD/wxPython*-osx*"  $STAGING_DIR
index 7b7c3b0be6a16dbbd1c0d7ee46775c8602ec1ae6..9438872a7869269fd8f50535129052cb71894b0f 100755 (executable)
@@ -3,8 +3,6 @@
 
 set -o errexit
 
-# read the config variables from the file given on the command line
-# . $1
 
 coHost=$1
 host=$2
index 051a5be90052767c5e45b2f0d376ad013c8ac54f..2ba143f26ccd58479479c9834ad2fa53d3d6bf92 100755 (executable)
@@ -3,9 +3,6 @@
 
 set -o errexit
 
-# read the config variables from the file given on the command line
-# . $1
-
 
 # clean out the local dist dir
 rm -f dist/*
index 3e7f9bdcdd97700e2861a73f98ee6f729e475166..09665f0c4432b16fff967e7776b056c517cfb5d2 100755 (executable)
@@ -3,9 +3,6 @@
 
 set -o errexit
 
-# read the config variables from the file given on the command line
-# . $1
-
 if [ $skipsource != yes -o $onlysource = yes ]; then
 
     # make the source tarball and srpm
index 252928627bea5702680458c8876f91771c438445..7e51c96be579513e6df6ab5047463106e85be768 100755 (executable)
@@ -3,8 +3,6 @@
 
 set -o errexit
 
-# read the config variables from the file given on the command line
-# . $1
 
 PYVER=$1
 
index 826c7f896e74d0a965bbf86b79ab51549cf6b34e..e97c0a96262ed6ca9c9d1ee74e87384d2b7475fd 100755 (executable)
@@ -9,8 +9,9 @@
 #    2. the path of where to put the resulting installers
 #    3. skipclean flag (yes|no)
 #    4. the VERSION
-#    5. the KIND (panther or jaguar)
-#    *. the remaining args are the versions of Python to build for
+#    5. the version of Python to build for
+#    6. the character type (ansi|unicode|both)
+#    7. optional flags to pass on to the build script
 #
 # ---------------------------------------------------------------------------
 
@@ -20,7 +21,7 @@ set -o errexit
 echo "-=-=-=-  Hello from $HOSTNAME  -=-=-=-"
 
 if [ $# -lt 6 ]; then
-    echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION KIND PYVER"
+    echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER CHARTYPE [FLAGS]"
     exit 1
 fi
 
@@ -28,8 +29,9 @@ WXDIR=$1
 DESTDIR=$2
 SKIPCLEAN=$3
 VERSION=$4
-KIND=$5
-PYVER=$6
+PYVER=$5
+CHARTYPE=$6
+FLAGS=$7
 
 
 #export PATH=/sw/bin:/usr/local/bin:$PATH
@@ -49,11 +51,12 @@ echo "Invoking wxPythonOSX build script..."
 cd $WXDIR/wxPython
 export TARBALLDIR=$DESTDIR
 mkdir -p dist
-if [ $KIND = panther ]; then
-    distrib/mac/wxPythonOSX/build $PYVER $KIND inplace unicode
+if [ $CHARTYPE = both ]; then
+    distrib/mac/wxPythonOSX/build $PYVER inplace unicode $FLAGS
+    distrib/mac/wxPythonOSX/build $PYVER inplace ansi $FLAGS
+else
+    distrib/mac/wxPythonOSX/build $PYVER inplace $CHARTYPE $FLAGS
 fi
-distrib/mac/wxPythonOSX/build $PYVER $KIND inplace 
-
 
 echo "Copying installers to $DESTDIR..."
 cp dist/*.dmg $DESTDIR
index c97ff0650d847cb4729864cee3cc03975b0ccdac..4fe7658a461c6227e402cab743593ae1aaa04ce3 100755 (executable)
@@ -31,10 +31,10 @@ PYVER=$5
 
 
 # WXDIR is the cygwin path, WXWIN is the DOS path
-WXWIN_OLD=$WXWIN
 WXWIN=`cygpath -w $WXDIR`
 export WXWIN
-
+export WXDIR
+export TOOLS=/cygdrive/c/TOOLS
 
 
 # setup the compiler
@@ -93,13 +93,35 @@ echo "Building the wx DLLs..."
 .make hybrid-uni
 
 
-#echo "Building the wx tools..."
-#.make_tools
+echo "Building tex2rtf..."
+cd $WXDIR/utils/tex2rtf/src
+$WXDIR/build/msw/.mymake hybrid 
+cp vc_mswhdll/tex2rtf.exe $WXDIR/lib/vc_dll/tex2rtf.exe
+
+echo "Building the HTMLHelp file..."
+DOCDIR=$WXDIR/docs
+cd $DOCDIR/latex/wx
+mkdir -p $DOCDIR/html/wx
+cp *.gif $DOCDIR/html/wx
+cp *.css $DOCDIR/html/wx
+DOCSRC=`cygpath -w $DOCDIR/latex/wx/manual.tex`
+DOCDEST=`cygpath -w $DOCDIR/html/wx/wx.htm` 
+DOCINI=`cygpath -w $DOCDIR/latex/wx/tex2rtf_css.ini`
+
+$WXDIR/lib/vc_dll/tex2rtf.exe $DOCSRC $DOCDEST -twice -html -macros $DOCINI
+
+cd $DOCDIR/html/wx
+cp $DOCDIR/latex/wx/wx.css .
+$TOOLS/HTMLHelpWorkshop/hhc.exe wx.hhp || true
+mkdir -p ../../htmlhelp
+mv wx.chm ../../htmlhelp
+
+# rm -f $DOCDIR/html/wx/*.con
+# rm -f $DOCDIR/html/wx/*.ref
+# rm -f $DOCDIR/latex/wx/*.con
+# rm -f $DOCDIR/latex/wx/*.ref
+
 
-# cheat and just copy the .CHM files from the regular project dir
-# TODO:  Copy over the wxPython-docs fle and run hhc on the contents of that.
-mkdir -p $WXDIR/docs/htmlhelp
-cp `cygpath $WXWIN_OLD/docs/htmlhelp`/*.chm $WXDIR/docs/htmlhelp
 
 
 echo "Building wxPython and installers..."
@@ -119,7 +141,7 @@ done
 echo "Building the developer package..."
 WXWIN=`cygpath -w $WXDIR`
 export WXWIN
-4nt /c distrib/makedev.bat $VERSION
+$TOOLS/4dos/4nt /c distrib/makedev.bat $VERSION
 
 
 echo "Copying installers to $DESTDIR..."
index 7b7f9aa7126ebb3473cc09a1304cd547d61b7347..8ab7b3d1fccb8e3e3f6f50ddbdd8b300661988ff 100644 (file)
@@ -45,7 +45,7 @@ class Config:
                 continue # it's a comment, move on
             data = line.split("=")
             if len(data) == 2:
-                self.__dict__[data[0]] = data[1]
+                self.__dict__[data[0].strip()] = data[1].strip()
         myfile.close()
 
 class Job(object):
index 0c55346f296df0b6db46950f764505868a04aac7..24f6d226ca7e2a011c6151451ecef611bd2a891f 100755 (executable)
@@ -123,6 +123,10 @@ elif [ "$OSTYPE" = "darwin" ]; then
     UNICODE_OPT=unicode
   fi 
   
+  DEBUG_OPT=
+  if [ $debug = yes ]; then
+    DEBUG_OPT=debug
+  fi
   # On Tiger, build Universal.
   UNIV_OPT=
   if [ ${OSX_VERSION:0:4} = "10.4" ]; then
@@ -132,9 +136,9 @@ elif [ "$OSTYPE" = "darwin" ]; then
   #sudo $WXWIN/wxPython/distrib/makedocs
   $WXWIN/wxPython/distrib/makedemo
   export TARBALLDIR=$WXWIN/wxPython/dist
-  echo "distrib/mac/wxPythonOSX/build $PY_DOT_VER panther inplace $UNICODE_OPT $RESWIG"
+  echo "distrib/mac/wxPythonOSX/build $PY_DOT_VER inplace $UNICODE_OPT $RESWIG"
   
-  distrib/mac/wxPythonOSX/build $PY_DOT_VER panther inplace $UNICODE_OPT $RESWIG $UNIV_OPT
+  distrib/mac/wxPythonOSX/build $PY_DOT_VER inplace $UNICODE_OPT $DEBUG_OPT $RESWIG $UNIV_OPT
 else
   echo "OSTYPE $OSTYPE not yet supported by this build script."
 fi
index 9f5473bf0ab0fb555395a346d82257684a72e73d..f05c29b41dc13e10029c5a2df656e5e3f6fc41f9 100755 (executable)
@@ -3,7 +3,7 @@
 # Build wxMac and wxPythonOSX from the tarball and then make an
 # Installer package out of it.
 
-##set -x
+#set -o xtrace
 
 spectemplate=distrib/wxPythonFull.spec.in
 
@@ -24,12 +24,10 @@ fi
 
 function usage {
     echo ""
-    echo "Usage: $0  PYVER  [jaguar|panther] [command flags...]"
+    echo "Usage: $0  PYVER [command flags...]"
     echo ""
-    echo "   PYVER          Python version to use to do the build"
-    echo ""
-    echo "   panther        Build for Apple's python in /usr/bin, such as on Panther"
-    echo "   jaguar         Build for a python in /usr/local/bin, such as on Jaguar"
+    echo "   PYVER          Python version to use to do the build.  A"
+    echo "                  matching python\$PYVER must be found on the PATH"
     echo ""
     echo "optional command flags:"
     echo "   skiptar        Don't unpack the tarball"
@@ -48,13 +46,8 @@ function usage {
 }
 
 
-if [ $# -lt 2 ]; then
-    usage
-    exit 1
-fi
-
 PYVER=$1
-if which python$PYVER && which pythonw$PYVER; then
+if [ "$PYVER" != "" ] && which python$PYVER && which pythonw$PYVER; then
     PYTHON=`which python$PYVER`
     PYTHONW=`which pythonw$PYVER`
 else
@@ -62,14 +55,7 @@ else
     exit 1
 fi
 
-KIND=$2
-case $KIND in
-    panther)    TAG=macosx10.3 ;;
-    jaguar)     TAG=macosx10.2 ;;
-    *)          usage; exit 1 ;;
-esac
-
-shift;shift
+shift
 
 skiptar=no
 skipconfig=no
@@ -79,6 +65,7 @@ skipdmg=no
 skipclean=no
 inplace=no
 unicode=no
+debug=no
 reswig=no
 universal=no
 
@@ -88,10 +75,12 @@ for flag in $*; do
        skipconfig)  skipconfig=yes; skiptar=yes                ;;
        skipbuild)   skipbuild=yes; skipconfig=yes; skiptar=yes ;;
        skipinstall) skipinstall=yes                            ;;
-    skipdmg)     skipdmg=yes                                ;;
+       skipdmg)     skipdmg=yes                                ;;
        skipclean)   skipclean=yes                              ;;
        inplace)     inplace=yes; skiptar=yes                   ;;
        unicode)     unicode=yes                                ;;
+       ansi)        unicode=no                                 ;;
+       debug)       debug=yes                                  ;;
        reswig)      reswig=yes                                 ;;
        universal)   universal=yes                              ;;
        *)  echo "Unknown flag \"${flag}\""
@@ -101,6 +90,23 @@ for flag in $*; do
 done
 
 
+
+OSX_VERSION=`sw_vers -productVersion`
+OSX_VERSION=${OSX_VERSION:0:4}
+
+case $OSX_VERSION in
+    10.4)    TAG=macosx10.4 ;;
+    10.3)    TAG=macosx10.3 ;;
+    10.2)    TAG=macosx10.2 ;;
+    *)       usage; exit 1 ;;
+esac
+
+if [ $universal = yes ]; then
+    TAG=universal10.4
+fi
+
+
+
 VERSION=`$PYTHON -c "import setup;print setup.VERSION"`
 SHORTVER=`echo $VERSION | cut -c 1,2,3`
 PYPREFIX=`$PYTHON -c "import sys; print sys.exec_prefix"`
@@ -117,6 +123,14 @@ else
     PYUNICODEOPT=0
 fi
 
+if [ $debug == yes ]; then
+    DEBUG_FLAG=--enable-debug
+    PYDEBUGOPT=--debug
+else
+    DEBUG_FLAG=--enable-debug_flag
+    PYDEBUGOPT=
+fi
+
 
 # Test if the python we are using is the System installed framework 
 # or one that was installed by the user.  This changes where the 
@@ -229,16 +243,12 @@ echo "Using source tree: $WXDIR"
 
 #----------------------------------------------------------------------
 
-if [ $KIND = panther ]; then 
+if [ $OSX_VERSION = 10.3 -o $OSX_VERSION = 10.4 ]; then 
     OTHER_CFG_OPTS=--enable-mediactrl
 fi
 
-UNIVOPT=
-if [ $universal = yes ]; then
-    UNIVOPT=--enable-universal_binary
-fi
 # Configure wxWidgets
-if [ $skipconfig != yes ]; then
+if [ $skipconfig != yes -a $universal != yes ]; then
     $WXDIR/configure \
        --prefix=$PREFIX \
        --with-mac \
@@ -247,12 +257,12 @@ if [ $skipconfig != yes ]; then
        --enable-sound \
        --enable-display \
        --enable-geometry \
-       --enable-debug_flag \
+       $DEBUG_FLAG \
        --enable-precomp=no \
        --enable-optimise \
        --disable-debugreport \
        --disable-precompiled-headers \
-       $UNICODEOPT $UNIVOPT $OTHER_CFG_OPTS
+       $UNICODEOPT $OTHER_CFG_OPTS
 
 fi
 
@@ -260,27 +270,23 @@ fi
 if [ $skipbuild != yes ]; then
 
     # Make wxWidgets and some contribs
-
-#     # For some reason Rez and DeRez have started locking up if run via
-#     # an ssh terminal.  Figure out why, but in the meantime...
-#     if [ "$CHARTYPE" = "ansi" ]; then
-#      echo cp /projects/wx2.5/bld/lib/libwx_macd-2.5.?.r* lib
-#           cp /projects/wx2.5/bld/lib/libwx_macd-2.5.?.r* lib
-#     else
-#      echo cp /projects/wx2.5/bld-unicode/lib/libwx_macud-2.5.?.r* lib
-#              cp /projects/wx2.5/bld-unicode/lib/libwx_macud-2.5.?.r* lib
-#     fi
-#     touch lib/libwx*.r*
-
-    make $MAKEJOBS
-    make $MAKEJOBS -C contrib/src/animate
-    make $MAKEJOBS -C contrib/src/gizmos
-    make $MAKEJOBS -C contrib/src/stc
-
-SWIGIT=0
-if [ $reswig = yes ]; then
-    SWIGIT=1
-fi
+    WXBLD_CONFIG="$WXBLD/wx-config"
+    if [ $universal = yes ]; then
+        export WXROOT
+        export BUILDPREFIX=$PREFIX
+        export INSTALLDIR=$INSTALLROOT$PREFIX
+        $WXDIR/distrib/scripts/mac/macbuild wxpython universal $CHARTYPE
+    else
+        make $MAKEJOBS
+        make $MAKEJOBS -C contrib/src/animate
+        make $MAKEJOBS -C contrib/src/gizmos
+        make $MAKEJOBS -C contrib/src/stc
+    fi
+    
+    SWIGIT=0
+    if [ $reswig = yes ]; then
+        SWIGIT=1
+    fi
 
     # Build wxPython
     cd $WXROOT/wxPython
@@ -288,7 +294,7 @@ fi
        UNICODE=$PYUNICODEOPT \
        NO_SCRIPTS=1 \
        EP_ADD_OPTS=1 \
-       WX_CONFIG="$WXBLD/wx-config --inplace" \
+       WX_CONFIG="$WXBLD_CONFIG --inplace" \
        BUILD_BASE=$WXBLD/wxPython \
        SWIG=$SWIGBIN \
        USE_SWIG=$SWIGIT \
@@ -300,11 +306,12 @@ fi
 if [ $skipinstall != yes ]; then
     # Install wxWidgets
     cd $WXBLD
-    make                        prefix=$INSTALLROOT$PREFIX install
-    make -C contrib/src/animate prefix=$INSTALLROOT$PREFIX install
-    make -C contrib/src/gizmos  prefix=$INSTALLROOT$PREFIX install
-    make -C contrib/src/stc     prefix=$INSTALLROOT$PREFIX install
-
+    if [ $universal != yes ]; then
+        make                        prefix=$INSTALLROOT$PREFIX install
+        make -C contrib/src/animate prefix=$INSTALLROOT$PREFIX install
+        make -C contrib/src/gizmos  prefix=$INSTALLROOT$PREFIX install
+        make -C contrib/src/stc     prefix=$INSTALLROOT$PREFIX install
+    fi
 
     # relink wx-config with a relative link
     cd $INSTALLROOT$PREFIX/bin
@@ -317,7 +324,7 @@ if [ $skipinstall != yes ]; then
        UNICODE=$PYUNICODEOPT \
        NO_SCRIPTS=1 \
        EP_ADD_OPTS=1 \
-       WX_CONFIG="$INSTALLROOT/$PREFIX/bin/wx-config --prefix=$INSTALLROOT/$PREFIX" \
+       WX_CONFIG="$INSTALLROOT$PREFIX/bin/wx-config --prefix=$INSTALLROOT$PREFIX" \
        BUILD_BASE=$WXBLD/wxPython \
        install \
        --root=$INSTALLROOT
@@ -372,10 +379,15 @@ if [ $skipdmg != yes ]; then
     # The main runtime installer package
 
     # Make the welcome message
-    case $KIND in
-       panther)  W_MSG="the Panther (OS X 10.3.x) version of" ;;
-       jaguar)   W_MSG="the Jaguar (OS X 10.2.x) version of" ;;
+    case $OSX_VERSION in
+       10.4)  W_MSG="the Tiger (OS X 10.4.x Intel) version of" ;;
+       10.3)  W_MSG="the Panther (OS X 10.3.x) version of" ;;
+       10.2)  W_MSG="the Jaguar (OS X 10.2.x) version of" ;;
     esac
+
+    if [ $universal == yes ]; then
+      W_MSG="the Universal (OS X 10.4.x and above) version of"
+    fi
     
 
     cat > $RESOURCEDIR/Welcome.txt <<EOF
@@ -423,9 +435,9 @@ EOF
     
 
     # Build the main Installer Package...
-    PKGNAME=wxPython${SHORTVER}-osx-$CHARTYPE-$KIND
+    PKGNAME=wxPython${SHORTVER}-osx-$CHARTYPE-$TAG
     if [ $PYVER != 2.3 ]; then
-       PKGNAME=wxPython${SHORTVER}-osx-$CHARTYPE-$KIND-py$PYVER
+       PKGNAME=wxPython${SHORTVER}-osx-$CHARTYPE-$TAG-py$PYVER
     fi
     rm -rf $PKGNAME.pkg
     $PYTHON $PROGDIR/../buildpkg.py \
@@ -600,7 +612,7 @@ EOF
        tar xjvf $TARBALLDIR/wxPython-demo-$VERSION.tar.bz2
        mv wxPython-$VERSION/* .
        rm -rf wxPython-$VERSION
-       rm demo/b demo/.setup.sh
+       rm -f demo/b demo/.setup.sh
        mv demo/demo.py demo/demo.pyw
        popd
 
@@ -660,3 +672,4 @@ else
     echo "Cleanup is disabled.  You should remove $TMPDIR when finished"
 fi
 
+exit 0
index bcf78a6d569c2b5297b9f2ace5ef6435137b83f8..418d8aa751fd9d486b1fb3cb7ebd542f59037576 100644 (file)
@@ -138,6 +138,7 @@ Source: "wxPython\tools\*.py";                    DestDir: "{app}\%(PKGDIR)s\wxP
 Source: "src\winxp.manifest";               DestDir: "{code:GetPythonDir}"; DestName: "python.exe.manifest";   Flags: sharedfile; Components:  manifest
 Source: "src\winxp.manifest";               DestDir: "{code:GetPythonDir}"; DestName: "pythonw.exe.manifest";  Flags: sharedfile; Components: manifest
 Source: "wxversion\wxversion.py";           DestDir: "{app}";  Flags: sharedfile;  Components: core
+Source: "wxaddons\*.py";                    DestDir: "{app}\wxaddons";  Flags: sharedfile;  Components: core
 Source: "src\wx.pth";                       DestDir: "{app}";  Flags: sharedfile;  Components: pthfile
 
 %(LOCALE)s
@@ -227,6 +228,12 @@ Type: files; Name: "{app}\%(PKGDIR)s\wxPython\lib\mixins\*.pyo";
 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\tools\*.pyc";
 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\tools\*.pyo";
 
+Type: files; Name: "{app}\wxversion.pyc";
+Type: files; Name: "{app}\wxversion.pyo";
+
+Type: files; Name: "{app}\%(PKGDIR)s\wxaddons\*.pyc";
+Type: files; Name: "{app}\%(PKGDIR)s\wxaddons\*.pyo";
+
 %(UNINSTALL_BATCH)s
 
 '''
index dcc7f0378b71bdab3d0f160cf61db10ac62652be..c392e5d685a9cdae7ea372b969d02722ce447906 100755 (executable)
@@ -142,6 +142,7 @@ Source: "wxPython\tools\*.py";                    DestDir: "{app}\%(PKGDIR)s\wxP
 Source: "src\winxp.manifest";               DestDir: "{code:GetPythonDir}"; DestName: "python.exe.manifest";   Flags: sharedfile; Components:  manifest
 Source: "src\winxp.manifest";               DestDir: "{code:GetPythonDir}"; DestName: "pythonw.exe.manifest";  Flags: sharedfile; Components: manifest
 Source: "wxversion\wxversion.py";           DestDir: "{app}";  Flags: sharedfile;  Components: core
+Source: "wxaddons\*.py";                    DestDir: "{app}\wxaddons";  Flags: sharedfile;  Components: core
 Source: "src\wx.pth";                       DestDir: "{app}";  Flags: sharedfile;  Components: pthfile
 
 %(LOCALE)s
@@ -231,6 +232,12 @@ Type: files; Name: "{app}\%(PKGDIR)s\wxPython\lib\mixins\*.pyo";
 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\tools\*.pyc";
 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\tools\*.pyo";
 
+Type: files; Name: "{app}\wxversion.pyc";
+Type: files; Name: "{app}\wxversion.pyo";
+
+Type: files; Name: "{app}\%(PKGDIR)s\wxaddons\*.pyc";
+Type: files; Name: "{app}\%(PKGDIR)s\wxaddons\*.pyo";
+
 %(UNINSTALL_BATCH)s
 
 '''
@@ -627,7 +634,7 @@ def main():
     ISSFILE         = "__wxPython.iss"
     ISSDEMOFILE     = "__wxPythonDemo.iss"
     IFSFILE         = "__wxPython.ifs"
-    IFSFILEREF    = "CodeFile = " + IFSFILE
+    IFSFILEREF      = "CodeFile = " + IFSFILE
     IFSFILEREF = ""
     UNINSTALL_BATCH = get_batch_files()
     PKGDIR          = open('src/wx.pth').read()
index b39243ea19f1e2a623630370fd2eac43660d5656..3d21e5a7c6e9dece117d97d11a6b05d9a5e6c063 100755 (executable)
@@ -140,6 +140,9 @@ if [ -z "${skipcopy}" ]; then
            cp -Rpf --link ${wxdir}/$d ${tarver} #> /dev/null 2>&1
        fi
     done
+    mkdir ${tarver}/distrib
+    cp -Rpf --link ${wxdir}/distrib/scripts ${tarver}/distrib
+
 
     # now do the same thing for wxPython, but use the DIRLIST to select dirs to copy
     for dir in `grep -v '#' ${wxdir}/wxPython/distrib/DIRLIST`; do
@@ -177,9 +180,11 @@ if [ -z "${skipcopy}" ]; then
     cleanup "*.pyc"
     cleanup core
     cleanup "core.[0-9]*"
+    rm -f wxPython/samples/embedded/embedded
+    rm -f wxPython/samples/embedded/embedded.o
 
     # ports that are not supported yet
-    cleanup cocoa
+    #cleanup cocoa    # wxMac needs some cocoa headers
     cleanup mgl
     cleanup motif
     cleanup os2
index 9473e27f74b43e505977b7aea91f13333d1a83af..a4117823bdcd9af850906a28f8f29203add9f3d2 100644 (file)
@@ -79,7 +79,7 @@
 # its use eventhough there is a compatibility problem that causes a
 # failed compile.
 %if %{?mediactrl:0}%{!?mediactrl:1}
-%define mediactrl 0
+%define mediactrl 1
 %endif
 
 
@@ -205,7 +205,7 @@ cd bld
        --with-gtk=2 \
 %endif
        --prefix=%{wxpref} \
-       --enable-monolithic \
+       --disable-monolithic \
        --disable-rpath \
        --with-opengl \
        --with-gnomeprint \
@@ -414,9 +414,13 @@ rm %{wxpref}/bin/wx-config
 %doc wxPython/docs/*
 %dir %{pref}/lib*/python%{pyver}/site-packages/wx-%{ver2}*-%{port}-%{chartype}
 %{pref}/lib*/python%{pyver}/site-packages/wx-%{ver2}*-%{port}-%{chartype}/*
+%dir %{pref}/lib*/python%{pyver}/site-packages/wxaddons
+%{pref}/lib*/python%{pyver}/site-packages/wxaddons/*
 %dir %{wxpref}
 %dir %{wxpref}/lib
-%{wxpref}/lib/libwx_gtk*
+%{wxpref}/lib/libwx_*
+%dir %{wxpref}/bin
+%{wxpref}/bin/wxrc*
 %{wxpref}/share
 
 
index 093e3d4b7bff73a8cc90c6d17522ac21bcd10ed7..69905adc160a5e895310b179b1c073efe3c854fc 100644 (file)
@@ -27,10 +27,11 @@ if len(sys.argv) > 1:
 from CreateBatchFiles import scripts
 repltxt = "#!/usr/bin/env python"
 
-
 # use the existing pythonw as a template
-gui_template = open(pythonw, "r").read().replace('"$@"', '"%s.py" "$@"')
-
+gui_template = """
+#!/bin/sh
+exec "%s" %%s.py "$@"
+""" % (sys.executable) 
 
 def main():
     for script, usegui in scripts:
index 42d59936a9366b327dfdc36afd5ce290f4c9fe7d..e1f378fb8bb38c84392173ab608c81cd16d32e50 100755 (executable)
@@ -207,9 +207,12 @@ swig_sources = run_swig(['gdi.i'], 'src', GENDIR, PKGDIR,
                          'src/_pen.i',
                          'src/_palette.i',
                          'src/_renderer.i',
+##                         'src/_pseudodc.i',
                          ],
                         True)
-ext = Extension('_gdi_', ['src/drawlist.cpp'] + swig_sources,
+ext = Extension('_gdi_', ['src/drawlist.cpp',
+##                          'src/pseudodc.cpp'
+                          ] + swig_sources,
                 include_dirs =  includes,
                 define_macros = defines,
                 library_dirs = libdirs,
@@ -446,6 +449,10 @@ swig_sources = run_swig(['xrc.i'], 'src', GENDIR, PKGDIR,
                           'src/_xml.i',
                           'src/_xmlhandler.i',
                           ])
+if not MONOLITHIC:
+    xrcLib = makeLibName('xrc')
+else:
+    xrcLib = []
 ext = Extension('_xrc',
                 swig_sources,
 
@@ -453,7 +460,7 @@ ext = Extension('_xrc',
                 define_macros = defines,
 
                 library_dirs = libdirs,
-                libraries = libs + makeLibName('xrc'),
+                libraries = libs + xrcLib,
 
                 extra_compile_args = cflags,
                 extra_link_args = lflags,
@@ -464,11 +471,15 @@ wxpExtensions.append(ext)
 
 swig_sources = run_swig(['richtext.i'], 'src', GENDIR, PKGDIR,
                         USE_SWIG, swig_force, swig_args, swig_deps)
+if not MONOLITHIC:
+    richLib = makeLibName('richtext')
+else:
+    richLib = []
 ext = Extension('_richtext', swig_sources,
                 include_dirs =  includes,
                 define_macros = defines,
                 library_dirs = libdirs,
-                libraries = libs + makeLibName('richtext'),
+                libraries = libs + richLib,
                 extra_compile_args = cflags,
                 extra_link_args = lflags,
                 **depends
@@ -491,10 +502,12 @@ if BUILD_GLCANVAS:
                             USE_SWIG, swig_force, swig_args, swig_deps)
 
     gl_libs = []
+    gl_libdirs = libdirs[:]
     if os.name == 'posix':
         gl_config = os.popen(WX_CONFIG + ' --libs gl', 'r').read()[:-1]
         gl_lflags = gl_config.split()
-        gl_libs = libs
+        gl_lflags = adjustLFLAGS(gl_lflags, gl_libdirs, gl_libs)
+
         
     else:
         gl_libs = libs + ['opengl32', 'glu32'] + makeLibName('gl')
@@ -506,7 +519,7 @@ if BUILD_GLCANVAS:
                     include_dirs = includes + CONTRIBS_INC,
                     define_macros = defines,
 
-                    library_dirs = libdirs,
+                    library_dirs = gl_libdirs,
                     libraries = gl_libs,
 
                     extra_compile_args = cflags,
@@ -839,6 +852,21 @@ if __name__ == "__main__":
                            },
               )
 
+        setup(name = 'wxaddons', 
+                  version          = VERSION,
+                  description      = DESCRIPTION,
+                  long_description = LONG_DESCRIPTION,
+                  author           = AUTHOR,
+                  author_email     = AUTHOR_EMAIL,
+                  url              = URL,
+                  download_url     = DOWNLOAD_URL,
+                  license          = LICENSE,
+                  platforms        = PLATFORMS,
+                  classifiers      = filter(None, CLASSIFIERS.split("\n")),
+                  keywords         = KEYWORDS,
+                  
+                  packages = ['wxaddons']
+             )
 
         if INSTALL_MULTIVERSION:
             setup(name             = 'wxPython-common',
diff --git a/wxPython/wxaddons/__init__.py b/wxPython/wxaddons/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/wxPython/wxaddons/setup.py b/wxPython/wxaddons/setup.py
new file mode 100644 (file)
index 0000000..8f136a7
--- /dev/null
@@ -0,0 +1,31 @@
+import distutils.command.install_lib
+import distutils.command.install
+import os
+from distutils.core import setup
+
+class wxaddon_install_lib(distutils.command.install_lib.install_lib):
+    """need to change self.install_dir to the actual library dir"""
+    def run(self):
+        install_cmd = self.get_finalized_command('install')
+        self.install_dir = os.path.join(getattr(install_cmd, 'install_purelib'), "wxaddons")
+        return distutils.command.install_lib.install_lib.run(self)
+        
+class wxaddon_install(distutils.command.install.install):
+    def run(self):
+        result = distutils.command.install.install.run(self)
+                
+        metadata_file = 'addon.info'
+        if os.path.exists(metadata_file):
+            import wx
+            import email
+            fields = email.message_from_string(open(metadata_file).read())
+            config = wx.Config("wxaddons-receipts")
+            config.SetPath(fields['name'])
+            for field in fields._headers:
+                config.Write(field[0], field[1])
+        return result     
+        
+def wxaddon(**kwargs):
+    kwargs['cmdclass'] =  {'install_lib' :    wxaddon_install_lib, 
+                           'install' :  wxaddon_install }
+    setup(**kwargs)
\ No newline at end of file