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') ]
wxPython/wx/tools
wxPython/wx/tools/XRCed
wxPython/wx/tools/XRCed/src-images
+wxPython/wxaddons
wxPython/wxPython
wxPython/wxPython/lib
wxPython/wxPython/lib/colourchooser
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
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..."
-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"
set -o errexit
-# read the config variables from the file given on the command line
-# . $1
-
-
chmod a+r $STAGING_DIR/*
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
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
set -o errexit
-# read the config variables from the file given on the command line
-# . $1
coHost=$1
host=$2
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/*
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
set -o errexit
-# read the config variables from the file given on the command line
-# . $1
PYVER=$1
# 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
#
# ---------------------------------------------------------------------------
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
DESTDIR=$2
SKIPCLEAN=$3
VERSION=$4
-KIND=$5
-PYVER=$6
+PYVER=$5
+CHARTYPE=$6
+FLAGS=$7
#export PATH=/sw/bin:/usr/local/bin:$PATH
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
# 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
.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..."
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..."
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):
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
#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
# 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
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"
}
-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
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
skipclean=no
inplace=no
unicode=no
+debug=no
reswig=no
universal=no
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}\""
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"`
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
#----------------------------------------------------------------------
-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 \
--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
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
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 \
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
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
# 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
# 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 \
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
echo "Cleanup is disabled. You should remove $TMPDIR when finished"
fi
+exit 0
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
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
'''
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
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
'''
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()
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
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
# 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
--with-gtk=2 \
%endif
--prefix=%{wxpref} \
- --enable-monolithic \
+ --disable-monolithic \
--disable-rpath \
--with-opengl \
--with-gnomeprint \
%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
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:
'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,
'src/_xml.i',
'src/_xmlhandler.i',
])
+if not MONOLITHIC:
+ xrcLib = makeLibName('xrc')
+else:
+ xrcLib = []
ext = Extension('_xrc',
swig_sources,
define_macros = defines,
library_dirs = libdirs,
- libraries = libs + makeLibName('xrc'),
+ libraries = libs + xrcLib,
extra_compile_args = cflags,
extra_link_args = lflags,
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
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')
include_dirs = includes + CONTRIBS_INC,
define_macros = defines,
- library_dirs = libdirs,
+ library_dirs = gl_libdirs,
libraries = gl_libs,
extra_compile_args = cflags,
},
)
+ 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',
--- /dev/null
+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