Build and distrib tweaks ported over from the 2.6 branch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-07-05 05:23:28 +00:00
parent 2dfa1180b0
commit 0f475e8aa9
24 changed files with 301 additions and 182 deletions

View File

@@ -585,7 +585,11 @@ def adjustLFLAGS(lflags, libdirs, libs):
else: else:
newLFLAGS.append(flag) 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') ]

View File

@@ -97,6 +97,7 @@ wxPython/wx/py/tests
wxPython/wx/tools wxPython/wx/tools
wxPython/wx/tools/XRCed wxPython/wx/tools/XRCed
wxPython/wx/tools/XRCed/src-images wxPython/wx/tools/XRCed/src-images
wxPython/wxaddons
wxPython/wxPython wxPython/wxPython
wxPython/wxPython/lib wxPython/wxPython/lib
wxPython/wxPython/lib/colourchooser wxPython/wxPython/lib/colourchooser

View File

@@ -40,53 +40,58 @@ class Job(Job):
def getTasks(config_env): def getTasks(config_env):
# Things that need to be done before any of the builds # Things that need to be done before any of the builds
initialTask = Task([ initialTask = Task([
Job("cleanup", "distrib/all/build-setup", env=config_env), Job("", "distrib/all/build-setup", env=config_env),
Job("makedocs", "distrib/all/build-docs", env=config_env), Job("", "distrib/all/build-docs", env=config_env),
Job("maketarball", "distrib/all/build-sources", env=config_env), Job("", "distrib/all/build-sources", env=config_env),
]) ])
# Build tasks. Anything that can be done in parallel (depends greatly # Build tasks. Anything that can be done in parallel (depends greatly
# on the nature of the build machines configurations...) is a separate # on the nature of the build machines configurations...) is a separate
# task. # task.
jaguarTask = Task( jaguarTask = Task( Job("whopper.23", "distrib/all/build-osx",
Job("whopper.23", [config.OSX_HOST_jaguar, "2.3", "ansi"], env=config_env) )
"distrib/all/build-osx", [config.OSX_HOST_jaguar, "jaguar", "2.3"], env=config_env) )
pantherTask = Task( pantherTask = Task( [ Job("bigmac.23",
[ Job("bigmac.23", "distrib/all/build-osx",
"distrib/all/build-osx", [config.OSX_HOST_panther, "panther", "2.3"], env=config_env), [config.OSX_HOST_panther, "2.3", "both"], env=config_env),
Job("bigmac.24", Job("bigmac.24",
"distrib/all/build-osx", [config.OSX_HOST_panther, "panther", "2.4"], env=config_env) "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( beastTask1 = Task(
[ Job("beast.23", "distrib/all/build-windows", ["2.3"], env=config_env), [ 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("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( beastTask2 = Task(
[ Job("co-fc2.23", ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc2", "fc2", "2.3"]), [ Job("co-fc2.23", "distrib/all/build-rpm", ["beast", "co-fc2", "fc2", "2.3"], env=config_env),
#Job("co-mdk101.23", ["distrib/all/build-rpm", CFGFILE, "beast", "co-mdk101","mdk101","2.3"]), Job("co-fc4.24", "distrib/all/build-rpm", ["beast", "co-fc4", "fc4", "2.4"], env=config_env),
Job("co-fc4.24", ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc4", "fc4", "2.4"]), Job("co-mdk102.24", "distrib/all/build-rpm", ["beast", "co-mdk102", "mdk102", "2.4"], env=config_env),
#Job("co-fc2.24", ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc2", "fc2", "2.4"]), Job("co-mdk2006.24","distrib/all/build-rpm", ["beast", "co-mdk2006", "mdk2006", "2.4"], env=config_env),
Job("co-mdk102.24", ["distrib/all/build-rpm", CFGFILE, "beast", "co-mdk102","mdk102","2.4"]),
]) ])
## 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, buildTasks = [ jaguarTask,
pantherTask, pantherTask,
tigerTask,
beastTask1, beastTask1,
beastTask2, beastTask2,
## cyclopsTask,
] ]
# Finalization. This is for things that must wait until all the # Finalization. This is for things that must wait until all the

View File

@@ -3,12 +3,6 @@
set -o errexit set -o errexit
set
# read the config variables from the file given on the command line
# . $1
if [ $skipdocs != yes ]; then if [ $skipdocs != yes ]; then
# Regenerate the reST docs # Regenerate the reST docs
echo "Regenerating the reST docs..." echo "Regenerating the reST docs..."

View File

@@ -1,36 +1,42 @@
skipnewdocs="no" # the local spot that we put everything when done, before copying
# 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"
# the local spot that we put everything when done, before possibly copying
# to remote hosts # to remote hosts
STAGING_DIR="./BUILD" STAGING_DIR = ./BUILD
UPLOAD_DAILY_ROOT="/home/crew/robind/public_html/wxPython/daily"
# host name of the machine to use for windows builds # host name of the machine to use for windows builds
WIN_HOST="beast" WIN_HOST = beast
# Where is the build dir from the remote machine's perspective? # Where is the build dir from the remote machine's perspective?
WIN_BUILD="/c/BUILD" WIN_BUILD = /c/BUILD
UPLOAD_HOST="starship.python.net" # Just like the above
skipsource="no" OSX_HOST_tiger = smallfry
KIND="dryrun" OSX_HOST_panther = bigmac
UPLOAD_PREVIEW_ROOT="/home/crew/robind/public_html/wxPython/rc" OSX_HOST_jaguar = whopper
skipclean="no" 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
skipdocs="no"
skipwin="no"
skiplinux="no"
skipupload="no"
startcohost="yes"
skiposx="no"
onlysource="no"

View File

@@ -3,10 +3,6 @@
set -o errexit set -o errexit
# read the config variables from the file given on the command line
# . $1
chmod a+r $STAGING_DIR/* chmod a+r $STAGING_DIR/*

View File

@@ -3,20 +3,18 @@
set -o errexit set -o errexit
# read the config variables from the file given on the command line
# . $1
host=$1 host=$1
flavor=$2 pyver=$2
pyver=$3 chartype=$3
flags=$4
if [ $skiposx != yes ]; then if [ $skiposx != yes ]; then
# test if the target machine is online # test if the target machine is online
if ping -q -c1 -w1 $host > /dev/null; then 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 else
echo "The $host machine is **OFFLINE**, skipping the OSX-$flavor build." echo "The $host machine is **OFFLINE**, skipping the OSX build."
exit 0 exit 0
fi fi
@@ -32,7 +30,7 @@ if [ $skiposx != yes ]; then
echo "Running build script on $host..." echo "Running build script on $host..."
wxdir=$OSX_BUILD/wxPython-src-$VERSION wxdir=$OSX_BUILD/wxPython-src-$VERSION
cmd=./do-build-osx 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..." echo "Fetching the results..."
scp "root@$host:$OSX_BUILD/wxPython*-osx*" $STAGING_DIR scp "root@$host:$OSX_BUILD/wxPython*-osx*" $STAGING_DIR

View File

@@ -3,8 +3,6 @@
set -o errexit set -o errexit
# read the config variables from the file given on the command line
# . $1
coHost=$1 coHost=$1
host=$2 host=$2

View File

@@ -3,9 +3,6 @@
set -o errexit set -o errexit
# read the config variables from the file given on the command line
# . $1
# clean out the local dist dir # clean out the local dist dir
rm -f dist/* rm -f dist/*

View File

@@ -3,9 +3,6 @@
set -o errexit set -o errexit
# read the config variables from the file given on the command line
# . $1
if [ $skipsource != yes -o $onlysource = yes ]; then if [ $skipsource != yes -o $onlysource = yes ]; then
# make the source tarball and srpm # make the source tarball and srpm

View File

@@ -3,8 +3,6 @@
set -o errexit set -o errexit
# read the config variables from the file given on the command line
# . $1
PYVER=$1 PYVER=$1

View File

@@ -9,8 +9,9 @@
# 2. the path of where to put the resulting installers # 2. the path of where to put the resulting installers
# 3. skipclean flag (yes|no) # 3. skipclean flag (yes|no)
# 4. the VERSION # 4. the VERSION
# 5. the KIND (panther or jaguar) # 5. the version of Python to build for
# *. the remaining args are the versions 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 -=-=-=-" echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
if [ $# -lt 6 ]; then 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 exit 1
fi fi
@@ -28,8 +29,9 @@ WXDIR=$1
DESTDIR=$2 DESTDIR=$2
SKIPCLEAN=$3 SKIPCLEAN=$3
VERSION=$4 VERSION=$4
KIND=$5 PYVER=$5
PYVER=$6 CHARTYPE=$6
FLAGS=$7
#export PATH=/sw/bin:/usr/local/bin:$PATH #export PATH=/sw/bin:/usr/local/bin:$PATH
@@ -49,11 +51,12 @@ echo "Invoking wxPythonOSX build script..."
cd $WXDIR/wxPython cd $WXDIR/wxPython
export TARBALLDIR=$DESTDIR export TARBALLDIR=$DESTDIR
mkdir -p dist mkdir -p dist
if [ $KIND = panther ]; then if [ $CHARTYPE = both ]; then
distrib/mac/wxPythonOSX/build $PYVER $KIND inplace unicode 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 fi
distrib/mac/wxPythonOSX/build $PYVER $KIND inplace
echo "Copying installers to $DESTDIR..." echo "Copying installers to $DESTDIR..."
cp dist/*.dmg $DESTDIR cp dist/*.dmg $DESTDIR

View File

@@ -31,10 +31,10 @@ PYVER=$5
# WXDIR is the cygwin path, WXWIN is the DOS path # WXDIR is the cygwin path, WXWIN is the DOS path
WXWIN_OLD=$WXWIN
WXWIN=`cygpath -w $WXDIR` WXWIN=`cygpath -w $WXDIR`
export WXWIN export WXWIN
export WXDIR
export TOOLS=/cygdrive/c/TOOLS
# setup the compiler # setup the compiler
@@ -93,13 +93,35 @@ echo "Building the wx DLLs..."
.make hybrid-uni .make hybrid-uni
#echo "Building the wx tools..." echo "Building tex2rtf..."
#.make_tools 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..." echo "Building wxPython and installers..."
@@ -119,7 +141,7 @@ done
echo "Building the developer package..." echo "Building the developer package..."
WXWIN=`cygpath -w $WXDIR` WXWIN=`cygpath -w $WXDIR`
export WXWIN export WXWIN
4nt /c distrib/makedev.bat $VERSION $TOOLS/4dos/4nt /c distrib/makedev.bat $VERSION
echo "Copying installers to $DESTDIR..." echo "Copying installers to $DESTDIR..."

View File

@@ -45,7 +45,7 @@ class Config:
continue # it's a comment, move on continue # it's a comment, move on
data = line.split("=") data = line.split("=")
if len(data) == 2: if len(data) == 2:
self.__dict__[data[0]] = data[1] self.__dict__[data[0].strip()] = data[1].strip()
myfile.close() myfile.close()
class Job(object): class Job(object):

View File

@@ -123,6 +123,10 @@ elif [ "$OSTYPE" = "darwin" ]; then
UNICODE_OPT=unicode UNICODE_OPT=unicode
fi fi
DEBUG_OPT=
if [ $debug = yes ]; then
DEBUG_OPT=debug
fi
# On Tiger, build Universal. # On Tiger, build Universal.
UNIV_OPT= UNIV_OPT=
if [ ${OSX_VERSION:0:4} = "10.4" ]; then if [ ${OSX_VERSION:0:4} = "10.4" ]; then
@@ -132,9 +136,9 @@ elif [ "$OSTYPE" = "darwin" ]; then
#sudo $WXWIN/wxPython/distrib/makedocs #sudo $WXWIN/wxPython/distrib/makedocs
$WXWIN/wxPython/distrib/makedemo $WXWIN/wxPython/distrib/makedemo
export TARBALLDIR=$WXWIN/wxPython/dist 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 else
echo "OSTYPE $OSTYPE not yet supported by this build script." echo "OSTYPE $OSTYPE not yet supported by this build script."
fi fi

View File

@@ -3,7 +3,7 @@
# Build wxMac and wxPythonOSX from the tarball and then make an # Build wxMac and wxPythonOSX from the tarball and then make an
# Installer package out of it. # Installer package out of it.
##set -x #set -o xtrace
spectemplate=distrib/wxPythonFull.spec.in spectemplate=distrib/wxPythonFull.spec.in
@@ -24,12 +24,10 @@ fi
function usage { function usage {
echo "" echo ""
echo "Usage: $0 PYVER [jaguar|panther] [command flags...]" echo "Usage: $0 PYVER [command flags...]"
echo "" echo ""
echo " PYVER Python version to use to do the build" echo " PYVER Python version to use to do the build. A"
echo "" echo " matching python\$PYVER must be found on the PATH"
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 "" echo ""
echo "optional command flags:" echo "optional command flags:"
echo " skiptar Don't unpack the tarball" echo " skiptar Don't unpack the tarball"
@@ -48,13 +46,8 @@ function usage {
} }
if [ $# -lt 2 ]; then
usage
exit 1
fi
PYVER=$1 PYVER=$1
if which python$PYVER && which pythonw$PYVER; then if [ "$PYVER" != "" ] && which python$PYVER && which pythonw$PYVER; then
PYTHON=`which python$PYVER` PYTHON=`which python$PYVER`
PYTHONW=`which pythonw$PYVER` PYTHONW=`which pythonw$PYVER`
else else
@@ -62,14 +55,7 @@ else
exit 1 exit 1
fi fi
KIND=$2 shift
case $KIND in
panther) TAG=macosx10.3 ;;
jaguar) TAG=macosx10.2 ;;
*) usage; exit 1 ;;
esac
shift;shift
skiptar=no skiptar=no
skipconfig=no skipconfig=no
@@ -79,6 +65,7 @@ skipdmg=no
skipclean=no skipclean=no
inplace=no inplace=no
unicode=no unicode=no
debug=no
reswig=no reswig=no
universal=no universal=no
@@ -92,6 +79,8 @@ for flag in $*; do
skipclean) skipclean=yes ;; skipclean) skipclean=yes ;;
inplace) inplace=yes; skiptar=yes ;; inplace) inplace=yes; skiptar=yes ;;
unicode) unicode=yes ;; unicode) unicode=yes ;;
ansi) unicode=no ;;
debug) debug=yes ;;
reswig) reswig=yes ;; reswig) reswig=yes ;;
universal) universal=yes ;; universal) universal=yes ;;
*) echo "Unknown flag \"${flag}\"" *) echo "Unknown flag \"${flag}\""
@@ -101,6 +90,23 @@ for flag in $*; do
done 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"` VERSION=`$PYTHON -c "import setup;print setup.VERSION"`
SHORTVER=`echo $VERSION | cut -c 1,2,3` SHORTVER=`echo $VERSION | cut -c 1,2,3`
PYPREFIX=`$PYTHON -c "import sys; print sys.exec_prefix"` PYPREFIX=`$PYTHON -c "import sys; print sys.exec_prefix"`
@@ -117,6 +123,14 @@ else
PYUNICODEOPT=0 PYUNICODEOPT=0
fi 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 # Test if the python we are using is the System installed framework
# or one that was installed by the user. This changes where the # 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 OTHER_CFG_OPTS=--enable-mediactrl
fi fi
UNIVOPT=
if [ $universal = yes ]; then
UNIVOPT=--enable-universal_binary
fi
# Configure wxWidgets # Configure wxWidgets
if [ $skipconfig != yes ]; then if [ $skipconfig != yes -a $universal != yes ]; then
$WXDIR/configure \ $WXDIR/configure \
--prefix=$PREFIX \ --prefix=$PREFIX \
--with-mac \ --with-mac \
@@ -247,12 +257,12 @@ if [ $skipconfig != yes ]; then
--enable-sound \ --enable-sound \
--enable-display \ --enable-display \
--enable-geometry \ --enable-geometry \
--enable-debug_flag \ $DEBUG_FLAG \
--enable-precomp=no \ --enable-precomp=no \
--enable-optimise \ --enable-optimise \
--disable-debugreport \ --disable-debugreport \
--disable-precompiled-headers \ --disable-precompiled-headers \
$UNICODEOPT $UNIVOPT $OTHER_CFG_OPTS $UNICODEOPT $OTHER_CFG_OPTS
fi fi
@@ -260,27 +270,23 @@ fi
if [ $skipbuild != yes ]; then if [ $skipbuild != yes ]; then
# Make wxWidgets and some contribs # Make wxWidgets and some contribs
WXBLD_CONFIG="$WXBLD/wx-config"
# # For some reason Rez and DeRez have started locking up if run via if [ $universal = yes ]; then
# # an ssh terminal. Figure out why, but in the meantime... export WXROOT
# if [ "$CHARTYPE" = "ansi" ]; then export BUILDPREFIX=$PREFIX
# echo cp /projects/wx2.5/bld/lib/libwx_macd-2.5.?.r* lib export INSTALLDIR=$INSTALLROOT$PREFIX
# cp /projects/wx2.5/bld/lib/libwx_macd-2.5.?.r* lib $WXDIR/distrib/scripts/mac/macbuild wxpython universal $CHARTYPE
# else 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
make $MAKEJOBS -C contrib/src/animate make $MAKEJOBS -C contrib/src/animate
make $MAKEJOBS -C contrib/src/gizmos make $MAKEJOBS -C contrib/src/gizmos
make $MAKEJOBS -C contrib/src/stc make $MAKEJOBS -C contrib/src/stc
fi
SWIGIT=0 SWIGIT=0
if [ $reswig = yes ]; then if [ $reswig = yes ]; then
SWIGIT=1 SWIGIT=1
fi fi
# Build wxPython # Build wxPython
cd $WXROOT/wxPython cd $WXROOT/wxPython
@@ -288,7 +294,7 @@ fi
UNICODE=$PYUNICODEOPT \ UNICODE=$PYUNICODEOPT \
NO_SCRIPTS=1 \ NO_SCRIPTS=1 \
EP_ADD_OPTS=1 \ EP_ADD_OPTS=1 \
WX_CONFIG="$WXBLD/wx-config --inplace" \ WX_CONFIG="$WXBLD_CONFIG --inplace" \
BUILD_BASE=$WXBLD/wxPython \ BUILD_BASE=$WXBLD/wxPython \
SWIG=$SWIGBIN \ SWIG=$SWIGBIN \
USE_SWIG=$SWIGIT \ USE_SWIG=$SWIGIT \
@@ -300,11 +306,12 @@ fi
if [ $skipinstall != yes ]; then if [ $skipinstall != yes ]; then
# Install wxWidgets # Install wxWidgets
cd $WXBLD cd $WXBLD
if [ $universal != yes ]; then
make prefix=$INSTALLROOT$PREFIX install make prefix=$INSTALLROOT$PREFIX install
make -C contrib/src/animate 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/gizmos prefix=$INSTALLROOT$PREFIX install
make -C contrib/src/stc prefix=$INSTALLROOT$PREFIX install make -C contrib/src/stc prefix=$INSTALLROOT$PREFIX install
fi
# relink wx-config with a relative link # relink wx-config with a relative link
cd $INSTALLROOT$PREFIX/bin cd $INSTALLROOT$PREFIX/bin
@@ -317,7 +324,7 @@ if [ $skipinstall != yes ]; then
UNICODE=$PYUNICODEOPT \ UNICODE=$PYUNICODEOPT \
NO_SCRIPTS=1 \ NO_SCRIPTS=1 \
EP_ADD_OPTS=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 \ BUILD_BASE=$WXBLD/wxPython \
install \ install \
--root=$INSTALLROOT --root=$INSTALLROOT
@@ -372,11 +379,16 @@ if [ $skipdmg != yes ]; then
# The main runtime installer package # The main runtime installer package
# Make the welcome message # Make the welcome message
case $KIND in case $OSX_VERSION in
panther) W_MSG="the Panther (OS X 10.3.x) version of" ;; 10.4) W_MSG="the Tiger (OS X 10.4.x Intel) version of" ;;
jaguar) W_MSG="the Jaguar (OS X 10.2.x) 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 esac
if [ $universal == yes ]; then
W_MSG="the Universal (OS X 10.4.x and above) version of"
fi
cat > $RESOURCEDIR/Welcome.txt <<EOF cat > $RESOURCEDIR/Welcome.txt <<EOF
Welcome! Welcome!
@@ -423,9 +435,9 @@ EOF
# Build the main Installer Package... # Build the main Installer Package...
PKGNAME=wxPython${SHORTVER}-osx-$CHARTYPE-$KIND PKGNAME=wxPython${SHORTVER}-osx-$CHARTYPE-$TAG
if [ $PYVER != 2.3 ]; then if [ $PYVER != 2.3 ]; then
PKGNAME=wxPython${SHORTVER}-osx-$CHARTYPE-$KIND-py$PYVER PKGNAME=wxPython${SHORTVER}-osx-$CHARTYPE-$TAG-py$PYVER
fi fi
rm -rf $PKGNAME.pkg rm -rf $PKGNAME.pkg
$PYTHON $PROGDIR/../buildpkg.py \ $PYTHON $PROGDIR/../buildpkg.py \
@@ -600,7 +612,7 @@ EOF
tar xjvf $TARBALLDIR/wxPython-demo-$VERSION.tar.bz2 tar xjvf $TARBALLDIR/wxPython-demo-$VERSION.tar.bz2
mv wxPython-$VERSION/* . mv wxPython-$VERSION/* .
rm -rf 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 mv demo/demo.py demo/demo.pyw
popd popd
@@ -660,3 +672,4 @@ else
echo "Cleanup is disabled. You should remove $TMPDIR when finished" echo "Cleanup is disabled. You should remove $TMPDIR when finished"
fi fi
exit 0

View 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: "python.exe.manifest"; Flags: sharedfile; Components: manifest
Source: "src\winxp.manifest"; DestDir: "{code:GetPythonDir}"; DestName: "pythonw.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: "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 Source: "src\wx.pth"; DestDir: "{app}"; Flags: sharedfile; Components: pthfile
%(LOCALE)s %(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\*.pyc";
Type: files; Name: "{app}\%(PKGDIR)s\wxPython\tools\*.pyo"; 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 %(UNINSTALL_BATCH)s
''' '''

View File

@@ -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: "python.exe.manifest"; Flags: sharedfile; Components: manifest
Source: "src\winxp.manifest"; DestDir: "{code:GetPythonDir}"; DestName: "pythonw.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: "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 Source: "src\wx.pth"; DestDir: "{app}"; Flags: sharedfile; Components: pthfile
%(LOCALE)s %(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\*.pyc";
Type: files; Name: "{app}\%(PKGDIR)s\wxPython\tools\*.pyo"; 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 %(UNINSTALL_BATCH)s
''' '''

View File

@@ -140,6 +140,9 @@ if [ -z "${skipcopy}" ]; then
cp -Rpf --link ${wxdir}/$d ${tarver} #> /dev/null 2>&1 cp -Rpf --link ${wxdir}/$d ${tarver} #> /dev/null 2>&1
fi fi
done 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 # 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 for dir in `grep -v '#' ${wxdir}/wxPython/distrib/DIRLIST`; do
@@ -177,9 +180,11 @@ if [ -z "${skipcopy}" ]; then
cleanup "*.pyc" cleanup "*.pyc"
cleanup core cleanup core
cleanup "core.[0-9]*" cleanup "core.[0-9]*"
rm -f wxPython/samples/embedded/embedded
rm -f wxPython/samples/embedded/embedded.o
# ports that are not supported yet # ports that are not supported yet
cleanup cocoa #cleanup cocoa # wxMac needs some cocoa headers
cleanup mgl cleanup mgl
cleanup motif cleanup motif
cleanup os2 cleanup os2

View File

@@ -79,7 +79,7 @@
# its use eventhough there is a compatibility problem that causes a # its use eventhough there is a compatibility problem that causes a
# failed compile. # failed compile.
%if %{?mediactrl:0}%{!?mediactrl:1} %if %{?mediactrl:0}%{!?mediactrl:1}
%define mediactrl 0 %define mediactrl 1
%endif %endif
@@ -205,7 +205,7 @@ cd bld
--with-gtk=2 \ --with-gtk=2 \
%endif %endif
--prefix=%{wxpref} \ --prefix=%{wxpref} \
--enable-monolithic \ --disable-monolithic \
--disable-rpath \ --disable-rpath \
--with-opengl \ --with-opengl \
--with-gnomeprint \ --with-gnomeprint \
@@ -414,9 +414,13 @@ rm %{wxpref}/bin/wx-config
%doc wxPython/docs/* %doc wxPython/docs/*
%dir %{pref}/lib*/python%{pyver}/site-packages/wx-%{ver2}*-%{port}-%{chartype} %dir %{pref}/lib*/python%{pyver}/site-packages/wx-%{ver2}*-%{port}-%{chartype}
%{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}
%dir %{wxpref}/lib %dir %{wxpref}/lib
%{wxpref}/lib/libwx_gtk* %{wxpref}/lib/libwx_*
%dir %{wxpref}/bin
%{wxpref}/bin/wxrc*
%{wxpref}/share %{wxpref}/share

View File

@@ -27,10 +27,11 @@ if len(sys.argv) > 1:
from CreateBatchFiles import scripts from CreateBatchFiles import scripts
repltxt = "#!/usr/bin/env python" repltxt = "#!/usr/bin/env python"
# use the existing pythonw as a template # 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(): def main():
for script, usegui in scripts: for script, usegui in scripts:

View File

@@ -207,9 +207,12 @@ swig_sources = run_swig(['gdi.i'], 'src', GENDIR, PKGDIR,
'src/_pen.i', 'src/_pen.i',
'src/_palette.i', 'src/_palette.i',
'src/_renderer.i', 'src/_renderer.i',
## 'src/_pseudodc.i',
], ],
True) True)
ext = Extension('_gdi_', ['src/drawlist.cpp'] + swig_sources, ext = Extension('_gdi_', ['src/drawlist.cpp',
## 'src/pseudodc.cpp'
] + swig_sources,
include_dirs = includes, include_dirs = includes,
define_macros = defines, define_macros = defines,
library_dirs = libdirs, library_dirs = libdirs,
@@ -446,6 +449,10 @@ swig_sources = run_swig(['xrc.i'], 'src', GENDIR, PKGDIR,
'src/_xml.i', 'src/_xml.i',
'src/_xmlhandler.i', 'src/_xmlhandler.i',
]) ])
if not MONOLITHIC:
xrcLib = makeLibName('xrc')
else:
xrcLib = []
ext = Extension('_xrc', ext = Extension('_xrc',
swig_sources, swig_sources,
@@ -453,7 +460,7 @@ ext = Extension('_xrc',
define_macros = defines, define_macros = defines,
library_dirs = libdirs, library_dirs = libdirs,
libraries = libs + makeLibName('xrc'), libraries = libs + xrcLib,
extra_compile_args = cflags, extra_compile_args = cflags,
extra_link_args = lflags, extra_link_args = lflags,
@@ -464,11 +471,15 @@ wxpExtensions.append(ext)
swig_sources = run_swig(['richtext.i'], 'src', GENDIR, PKGDIR, swig_sources = run_swig(['richtext.i'], 'src', GENDIR, PKGDIR,
USE_SWIG, swig_force, swig_args, swig_deps) USE_SWIG, swig_force, swig_args, swig_deps)
if not MONOLITHIC:
richLib = makeLibName('richtext')
else:
richLib = []
ext = Extension('_richtext', swig_sources, ext = Extension('_richtext', swig_sources,
include_dirs = includes, include_dirs = includes,
define_macros = defines, define_macros = defines,
library_dirs = libdirs, library_dirs = libdirs,
libraries = libs + makeLibName('richtext'), libraries = libs + richLib,
extra_compile_args = cflags, extra_compile_args = cflags,
extra_link_args = lflags, extra_link_args = lflags,
**depends **depends
@@ -491,10 +502,12 @@ if BUILD_GLCANVAS:
USE_SWIG, swig_force, swig_args, swig_deps) USE_SWIG, swig_force, swig_args, swig_deps)
gl_libs = [] gl_libs = []
gl_libdirs = libdirs[:]
if os.name == 'posix': if os.name == 'posix':
gl_config = os.popen(WX_CONFIG + ' --libs gl', 'r').read()[:-1] gl_config = os.popen(WX_CONFIG + ' --libs gl', 'r').read()[:-1]
gl_lflags = gl_config.split() gl_lflags = gl_config.split()
gl_libs = libs gl_lflags = adjustLFLAGS(gl_lflags, gl_libdirs, gl_libs)
else: else:
gl_libs = libs + ['opengl32', 'glu32'] + makeLibName('gl') gl_libs = libs + ['opengl32', 'glu32'] + makeLibName('gl')
@@ -506,7 +519,7 @@ if BUILD_GLCANVAS:
include_dirs = includes + CONTRIBS_INC, include_dirs = includes + CONTRIBS_INC,
define_macros = defines, define_macros = defines,
library_dirs = libdirs, library_dirs = gl_libdirs,
libraries = gl_libs, libraries = gl_libs,
extra_compile_args = cflags, 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: if INSTALL_MULTIVERSION:
setup(name = 'wxPython-common', setup(name = 'wxPython-common',

View File

View File

@@ -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)