This commit was manufactured by cvs2svn to create tag 'WX_2_4_0'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_4_0@18627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
91
wxPython/distrib/README.1st.txt
Normal file
91
wxPython/distrib/README.1st.txt
Normal file
@@ -0,0 +1,91 @@
|
||||
README for wxPythonSrc-*.tar.gz
|
||||
-------------------------------
|
||||
|
||||
Prior to version 2.3.3 of wxPython I had always made my Linux/Unix
|
||||
binaries based on the released binary of wxGTK and wxGTK-gl. This
|
||||
imposed a few restrictions and so starting with 2.3.3 I have decided
|
||||
to do a combined binary that inlcudes wxGTK as well as wxPython. This
|
||||
allows me a bit more flexibility and is consistent with how the
|
||||
Windows and Mac OS X binaries are built.
|
||||
|
||||
If you are reading this file then you are probably interested in
|
||||
building your own copy of wxPython from the sources contained in this
|
||||
archive. If you wish to use the released wxGTK binary as has been
|
||||
done in the past then you can still follow the old build directions in
|
||||
wxPython/BUILD.unix.txt. If you are building for Windows or Mac OS X
|
||||
then you should look at wxPython/BUILD.win32.txt or
|
||||
wxPython/BUILD.osx.txt respectivly. In all these cases you should use
|
||||
the IN_CVS_TREE=1 flag since this archive is really just a modified
|
||||
CVS snapshot.
|
||||
|
||||
If, on the other hand, you would like to build Linux/Unix binaries
|
||||
with a private copy of wxGTK like what I am now distributing then
|
||||
you'll want to follow the instructions in this file.
|
||||
|
||||
Clear as mud? Good. Let's get started.
|
||||
|
||||
|
||||
1. We'll be making a private copy of wxGTK so it doesn't conflict with
|
||||
one used by wxGTK C++ apps that expect to have the default binary
|
||||
installed from RPM or whatever. I put it in /usr/lib/wxPython, but
|
||||
you can use whatever you like. I'll just set a variable to our wx
|
||||
prefix to reference later:
|
||||
|
||||
export WXPREF=/usr/lib/wxPython
|
||||
|
||||
|
||||
2. Make a build directory and configure wxGTK.
|
||||
|
||||
cd wxPythonGTK-2.3.3 # or whatever the top-level dir is
|
||||
mkdir build
|
||||
cd build
|
||||
../configure --with-gtk \
|
||||
--prefix=$WXPREF \
|
||||
--enable-rpath=$WXPREF/lib \
|
||||
--with-opengl \
|
||||
--enable-geometry \
|
||||
--enable-optimise \
|
||||
--enable-debug_flag \
|
||||
|
||||
You may want to use --enable-debug instead of --enable-optimise if
|
||||
you need to run though a debugger and want full debugging symbols.
|
||||
|
||||
if you want to use the image and zlib libraries included with
|
||||
wxWindows instead of those already installed on your system, (for
|
||||
example, to reduce dependencies on 3rd party libraries) then you
|
||||
can add these flags to the configure command:
|
||||
|
||||
--with-libjpeg=builtin \
|
||||
--with-libpng=builtin \
|
||||
--with-libtiff=builtin \
|
||||
--with-zlib=builtin
|
||||
|
||||
|
||||
3. Build and install wxGTK. (You may need to be root for the last
|
||||
step, depending on where your WXPREF is.)
|
||||
|
||||
make
|
||||
cd ../locale
|
||||
make allmo
|
||||
cd ../build
|
||||
make install
|
||||
|
||||
4. Build and install wxPython. If you want to use a different version
|
||||
of Python than is found by default on the PATH then specify the
|
||||
whole pathname in these steps. The version of Python that runs
|
||||
setup.py is the version wxPython will be built and installed for.
|
||||
(You will need to be root for the install step unless your Python
|
||||
is not in a system location.)
|
||||
|
||||
cd ../wxPython
|
||||
python setup.py \
|
||||
IN_CVS_TREE=1 WX_CONFIG=$WXPREF/bin/wx-config \
|
||||
build install
|
||||
|
||||
5. That's all!
|
||||
|
||||
--
|
||||
Robin Dunn
|
||||
Software Craftsman
|
||||
http://wxPython.org Java give you jitters? Relax with wxPython!
|
||||
|
||||
17
wxPython/distrib/README.viewdocs.txt
Normal file
17
wxPython/distrib/README.viewdocs.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
wxPythonDocs
|
||||
------------
|
||||
|
||||
The wxWindows docs can now be viewed on non-Win32 platforms with a
|
||||
nice viewer modeled after the MS HTMLHelp viewer. Simply execute the
|
||||
viewdocs.py script located in this directory and you're all set.
|
||||
(You'll need to first have wxPython installed and accessible via the
|
||||
PYTHONPATH.)
|
||||
|
||||
You can also add other HTML books to be displayed by the viewer simply
|
||||
by dropping their .zip file here, viewdocs.py will find them
|
||||
automatically and add them to the list. The zip file just needs to
|
||||
contain a .hhp file that defines the contents of the book. See the
|
||||
docs on wxHtmlHelpController for details.
|
||||
|
||||
If you'd still ike to view these docs in your regular browser you can
|
||||
simply unzip each of the books into their own directory.
|
||||
51
wxPython/distrib/genfilelist.py
Normal file
51
wxPython/distrib/genfilelist.py
Normal file
@@ -0,0 +1,51 @@
|
||||
"""
|
||||
Walk a directory tree and output a filename list suitable for use
|
||||
in an RPM spec.
|
||||
|
||||
Usage: genfilelist.py [-r] build_root filespec(s)
|
||||
|
||||
"""
|
||||
|
||||
|
||||
import sys, os, glob, stat
|
||||
|
||||
|
||||
def walktree(names, buildroot, recurse):
|
||||
for name in names:
|
||||
isdir = os.path.isdir(name)
|
||||
printfilename(name, buildroot, isdir)
|
||||
if isdir and recurse:
|
||||
walktree([os.path.join(name, x) for x in os.listdir(name)], buildroot, recurse)
|
||||
|
||||
|
||||
def printfilename(name, buildroot, isdir):
|
||||
s = os.lstat(name)
|
||||
realname = name[len(buildroot):]
|
||||
if isdir:
|
||||
fmt = "%%dir %%attr(%o, root, root) %s"
|
||||
else:
|
||||
fmt = "%%attr(%o, root, root) %s"
|
||||
print fmt % (s[stat.ST_MODE] & 0777, realname)
|
||||
|
||||
|
||||
def main(args):
|
||||
if args[0] == '-r':
|
||||
recurse = 1
|
||||
args = args[1:]
|
||||
else:
|
||||
recurse = 0
|
||||
|
||||
if len(args) < 2:
|
||||
print __str__
|
||||
sys.exit(1)
|
||||
|
||||
buildroot = args[0]
|
||||
for arg in args[1:]:
|
||||
if arg[0] == '/':
|
||||
arg = arg[1:]
|
||||
walktree(glob.glob(os.path.join(buildroot, arg)), buildroot, recurse)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1:])
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
You will be guided through the steps necessary to install wxPython 2.3.3pre (including wxMac) for MachoPython 2.2.x on Mac OS X 10.1 or later.
|
||||
You will be guided through the steps necessary to install wxPython 2.4.0 (including wxMac) for MachoPython 2.2.x on Mac OS X 10.1 or later.
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ will be created.
|
||||
"""
|
||||
|
||||
|
||||
import sys, os, string
|
||||
import sys, os, string, time
|
||||
|
||||
KEEP_TEMPS = 0
|
||||
ISCC = r"%s\InnoSetup2Ex\ISCC.exe %s"
|
||||
@@ -32,12 +32,12 @@ OutputDir = dist
|
||||
WizardStyle = modern
|
||||
UninstallStyle = modern
|
||||
DisableStartupPrompt = true
|
||||
CompressLevel = 9
|
||||
Compression = bzip
|
||||
DirExistsWarning = no
|
||||
DisableReadyMemo = true
|
||||
DisableReadyPage = true
|
||||
;;DisableDirPage = true
|
||||
DisableProgramGroupPage = true
|
||||
DisableProgramGroupPage = no
|
||||
DisableAppendDir = true
|
||||
UsePreviousAppDir = no
|
||||
UsePreviousGroup = no
|
||||
@@ -47,6 +47,8 @@ AppPublisherURL = http://wxPython.org/
|
||||
LicenseFile = licence\licence.txt
|
||||
CodeFile = %(IFSFILE)s
|
||||
|
||||
;; WizardDebug = yes
|
||||
|
||||
;;------------------------------------------------------------
|
||||
|
||||
;;[Dirs]
|
||||
@@ -142,6 +144,7 @@ Source: "wxPython\tools\*.py"; DestDir: "{app}\wxPython\tools"; Com
|
||||
Source: "wxPython\tools\XRCed\CHANGES"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
|
||||
Source: "wxPython\tools\XRCed\TODO"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
|
||||
Source: "wxPython\tools\XRCed\README"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
|
||||
Source: "wxPython\tools\XRCed\sawfishrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
|
||||
Source: "wxPython\tools\XRCed\*.py"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
|
||||
Source: "wxPython\tools\XRCed\*.xrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
|
||||
Source: "wxPython\tools\XRCed\*.ico"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
|
||||
@@ -149,6 +152,7 @@ Source: "wxPython\tools\XRCed\*.sh"; DestDir: "{app}\wxPython\tools\XRCed
|
||||
|
||||
Source: "scripts\*.bat"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
Source: "scripts\*.py"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
Source: "scripts\helpviewer"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
Source: "scripts\img2png"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
Source: "scripts\img2py"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
Source: "scripts\img2xpm"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
@@ -269,6 +273,7 @@ var
|
||||
PythonDir : String;
|
||||
InstallDir : String;
|
||||
|
||||
|
||||
function InitializeSetup(): Boolean;
|
||||
begin
|
||||
if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
|
||||
@@ -279,7 +284,8 @@ begin
|
||||
'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
|
||||
'', PythonDir) then begin
|
||||
|
||||
MsgBox('No installation of Python %(PYTHONVER)s found in registry.\nBe sure to enter a pathname that places wxPython\non the PYTHONPATH',
|
||||
MsgBox('No installation of Python %(PYTHONVER)s found in registry.' + #13 +
|
||||
'Be sure to enter a pathname that places wxPython on the PYTHONPATH',
|
||||
mbConfirmation, MB_OK);
|
||||
PythonDir := 'C:\Put a directory on PYTHONPATH here\';
|
||||
end;
|
||||
@@ -300,12 +306,34 @@ begin
|
||||
Result := InstallDir;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
function NextButtonClick(CurPage: Integer): Boolean;
|
||||
var
|
||||
FileName: string;
|
||||
ResultCode: Integer;
|
||||
begin
|
||||
Result := True;
|
||||
if CurPage <> wpSelectDir then Exit;
|
||||
FileName := WizardDirValue() + '\wxPython\unins000.exe';
|
||||
if FileExists(FileName) then begin
|
||||
ResultCode := MsgBox('A prior wxPython installation was found in this directory. It' + #13 +
|
||||
'is recommended that it be uninstalled first.' + #13#13 +
|
||||
'Should I do it?',
|
||||
mbConfirmation, MB_YESNO);
|
||||
if ResultCode = IDYES then begin
|
||||
InstExec(FileName, '/SILENT', WizardDirValue()+'\wxPython', True, False, SW_SHOWNORMAL, ResultCode);
|
||||
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
begin
|
||||
end.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def find_DLLs():
|
||||
@@ -370,6 +398,7 @@ def main():
|
||||
os.system(ISCC % (os.environ['TOOLS'], ISSFILE))
|
||||
|
||||
if not KEEP_TEMPS:
|
||||
time.sleep(1)
|
||||
os.remove(ISSFILE)
|
||||
os.remove(IFSFILE)
|
||||
|
||||
|
||||
@@ -21,15 +21,17 @@ cp -R samples _distrib_tgz/wxPython-$1
|
||||
rm -rf `find _distrib_tgz/wxPython-$1 -name CVS`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name "*.pyc"`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name .cvsignore`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name core`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name "core*"`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name wxPython`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name *.o`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name *.so`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name "*.o"`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name "*.so"`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name "*~"`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name ".#*"`
|
||||
|
||||
cd _distrib_tgz
|
||||
|
||||
tar cvf ../dist/wxPythonDemo-$1.tar wxPython-$1
|
||||
gzip ../dist/wxPythonDemo-$1.tar
|
||||
gzip -9 ../dist/wxPythonDemo-$1.tar
|
||||
|
||||
cd ..
|
||||
rm -r _distrib_tgz
|
||||
|
||||
@@ -59,8 +59,8 @@ del /sxzy %BASE%\include\wx\x11\nanox\X11\CVS
|
||||
|
||||
rem *** bundle it all up
|
||||
cd _distrib_zip
|
||||
tar cvf ..\dist\wxPythonWIN32-devel-%1.tar wxPython-%1
|
||||
gzip -9 ..\dist\wxPythonWIN32-devel-%1.tar
|
||||
tar cvf ../dist/wxPythonWIN32-devel-%1.tar wxPython-%1
|
||||
gzip -9 ../dist/wxPythonWIN32-devel-%1.tar
|
||||
|
||||
rem *** cleanup
|
||||
cd ..
|
||||
|
||||
63
wxPython/distrib/makedocs
Executable file
63
wxPython/distrib/makedocs
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
if [ -z $1 ]; then
|
||||
echo "Please specify a version number on the command line."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d wxPython ]; then # TODO: make this test more robust
|
||||
echo "Please run this script from the root wxPython directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# **** Make a directory to build up a distribution tree
|
||||
|
||||
DEST=wxPython-$1/docs
|
||||
|
||||
mkdir -p _build_docs/$DEST
|
||||
cd _build_docs
|
||||
mkdir $DEST/wx
|
||||
mkdir $DEST/ogl
|
||||
|
||||
WXDIR=../..
|
||||
|
||||
# **** Build the docs using tex2rtf
|
||||
cp $WXDIR/docs/latex/wx/*.gif $DEST/wx
|
||||
$WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/docs/latex/wx/manual.tex $DEST/wx/wx.htm -twice -html
|
||||
cp $DEST/wx/wx.htm $DEST/wx/index.htm
|
||||
|
||||
cp $WXDIR/contrib/docs/latex/ogl/*.gif $DEST/ogl
|
||||
cp $WXDIR/contrib/docs/latex/ogl/*.bmp $DEST/ogl
|
||||
$WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/contrib/docs/latex/ogl/ogl.tex $DEST/ogl/ogl.htm -twice -html
|
||||
cp $DEST/ogl/ogl.htm $DEST/ogl/index.htm
|
||||
|
||||
|
||||
# **** zip the docs into "books"
|
||||
pushd $DEST
|
||||
pushd wx
|
||||
zip ../wx.zip *
|
||||
popd
|
||||
rm -r wx
|
||||
|
||||
pushd ogl
|
||||
zip ../ogl.zip *
|
||||
popd
|
||||
rm -r ogl
|
||||
|
||||
popd
|
||||
cp ../distrib/viewdocs.py $DEST
|
||||
cp ../distrib/README.viewdocs.txt $DEST/README.txt
|
||||
|
||||
rm -f ../dist/wxPythonDocs-$1.tar.gz
|
||||
tar cvf ../dist/wxPythonDocs-$1.tar $DEST
|
||||
gzip -9 ../dist/wxPythonDocs-$1.tar
|
||||
|
||||
|
||||
# **** Cleanup
|
||||
cd ..
|
||||
rm -r _build_docs
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
@echo off
|
||||
|
||||
rem **** Make a directory to build up a distribution tree
|
||||
md _distrib_zip
|
||||
md _distrib_zip\wxPython-%1
|
||||
|
||||
cd _distrib_zip
|
||||
|
||||
rem **** copy the docs into the tree
|
||||
md wxPython-%1\docs
|
||||
md wxPython-%1\docs\wx
|
||||
md wxPython-%1\docs\ogl
|
||||
copy %WXWIN%\docs\html\wx\*.* wxPython-%1\docs\wx
|
||||
copy wxPython-%1\docs\wx\wx.htm wxPython-%1\docs\wx\index.htm
|
||||
copy %WXWIN%\docs\html\ogl\*.* wxPython-%1\docs\ogl
|
||||
copy wxPython-%1\docs\ogl\ogl.htm wxPython-%1\docs\ogl\index.htm
|
||||
|
||||
rem **** zip up the docs
|
||||
rem zip -r ..\distrib\wxPython-docs-%1.zip wxPython-%1\docs
|
||||
tar cvf ..\dist\wxPythonDocs-%1.tar wxPython-%1
|
||||
gzip -9 ..\dist\wxPythonDocs-%1.tar
|
||||
|
||||
|
||||
rem **** Cleanup
|
||||
cd ..
|
||||
del /sxzy _distrib_zip
|
||||
@@ -16,12 +16,12 @@ fi
|
||||
distdir=`pwd`/dist
|
||||
builddir=`pwd`/_build_rpm
|
||||
rpmtop=${builddir}/rpmtop
|
||||
cvsroot=:pserver:anoncvs@cvs.wxwindows.org:/home/wxcvs
|
||||
cvsroot=:pserver:anoncvs@cvs.wxwindows.org:/pack/cvsroots/wxwindows
|
||||
pythonbin=/usr/bin/python
|
||||
port=GTK
|
||||
lcport=gtk
|
||||
unicode=0
|
||||
tarname=wxPythonSrc
|
||||
debug=0
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -39,9 +39,10 @@ function useage {
|
||||
echo " skiptar Don't build the tarball"
|
||||
echo " skiprpm Don't build the RPM (but why?)"
|
||||
echo " skipclean Don't do the cleanup at the end"
|
||||
echo " gtk2 Build using wxGTK2 and Unicode"
|
||||
echo " x11 Build using wxX11"
|
||||
echo " speconly Do nothing but write the RPM spec file"
|
||||
echo " debug Make a __WXDEBUG__ version"
|
||||
echo " smp Add SMP=2 to the envivonment to speed wxGTK build"
|
||||
# echo " smp Add SMP=2 to the envivonment to speed wxGTK build"
|
||||
}
|
||||
|
||||
if [ $# -lt 3 ]; then
|
||||
@@ -70,12 +71,12 @@ function makespec {
|
||||
cat ${spectemplate} \
|
||||
| sed s:@PYTHON@:${python}:g \
|
||||
| sed s:@PYVER@:${pyver}:g \
|
||||
| sed s:@DEBUG@:${debug}:g \
|
||||
| sed s:@PORT@:${port}:g \
|
||||
| sed s:@LCPORT@:${lcport}:g \
|
||||
| sed s:@TARNAME@:${tarname}:g \
|
||||
| sed s:@VERSION@:${version}:g \
|
||||
| sed s:@VER2@:${ver2}:g \
|
||||
| sed s:@UNICODE@:${unicode}:g \
|
||||
> ${distdir}/wxPython${port}.spec
|
||||
}
|
||||
|
||||
@@ -83,13 +84,14 @@ function makespec {
|
||||
|
||||
for flag in $*; do
|
||||
case ${flag} in
|
||||
skipcvs) skipcvs=1 ;;
|
||||
skipclean) skipclean=1 ;;
|
||||
skiptar) skiptar=1 ;;
|
||||
skiprpm) skiprpm=1 ;;
|
||||
smp) export SMP=2 ;;
|
||||
debug) debug=1 ;;
|
||||
speconly) makespec; exit 0 ;;
|
||||
skipcvs) skipcvs=1 ;;
|
||||
skipclean) skipclean=1 ;;
|
||||
skiptar) skiptar=1 ;;
|
||||
skiprpm) skiprpm=1 ;;
|
||||
gtk2) unicode=1; port=GTK2; lcport=gtk2 ;;
|
||||
x11) port=X11; lcport=x11 ;;
|
||||
smp) export SMP=2 ;;
|
||||
speconly) makespec; exit 0 ;;
|
||||
|
||||
*) echo "Unknown flag \"${flag}\""
|
||||
useage
|
||||
@@ -172,6 +174,7 @@ cp ${distdir}/wxPython${port}.spec ${builddir}/${tarver}/wxPython${port}.spec
|
||||
|
||||
if [ -z "${skiptar}" ]; then
|
||||
echo "*** Creating tarball..."
|
||||
cp distrib/README.1st.txt ${builddir}/${tarver}
|
||||
pushd ${builddir} > /dev/null
|
||||
tar cvf ${distdir}/${tarver}.tar ${tarver} > /dev/null
|
||||
echo "*** Compressing..."
|
||||
@@ -189,7 +192,7 @@ fi
|
||||
if [ -z "${skiprpm}" ]; then
|
||||
echo "*** Building RPMs..."
|
||||
cp ${distdir}/${tarver}.tar.gz ${rpmtop}/SOURCES
|
||||
rpm -ba \
|
||||
rpmbuild -ba \
|
||||
--define "_topdir ${rpmtop}" \
|
||||
--define "_tmppath ${builddir}" \
|
||||
${distdir}/wxPython${port}.spec
|
||||
|
||||
31
wxPython/distrib/viewdocs.py
Executable file
31
wxPython/distrib/viewdocs.py
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
import sys, os, glob
|
||||
from wxPython.tools import helpviewer
|
||||
|
||||
|
||||
# Figure out the path where this app is located
|
||||
if __name__ == '__main__':
|
||||
basePath = os.path.dirname(sys.argv[0])
|
||||
else:
|
||||
basePath = os.path.dirname(__file__)
|
||||
|
||||
|
||||
# setup the args
|
||||
args = ['',
|
||||
'--cache='+basePath,
|
||||
os.path.join(basePath, 'wx.zip'),
|
||||
os.path.join(basePath, 'ogl.zip'),
|
||||
]
|
||||
|
||||
# add any other .zip files found
|
||||
for file in glob.glob(os.path.join(basePath, "*.zip")):
|
||||
if file not in args:
|
||||
args.append(file)
|
||||
|
||||
# launch helpviewer
|
||||
helpviewer.main(args)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,32 +1,34 @@
|
||||
%define pref %{_prefix}
|
||||
%define python @PYTHON@
|
||||
%define pyver @PYVER@
|
||||
%define debug @DEBUG@
|
||||
%define port @PORT@
|
||||
%define lcport @LCPORT@
|
||||
%define unicode @UNICODE@
|
||||
%define tarname @TARNAME@
|
||||
%define version @VERSION@
|
||||
%define ver2 @VER2@
|
||||
%define release 1
|
||||
%define wxpref %{pref}/lib/wxPython
|
||||
%define name wxPython%{port}-py%{pyver}
|
||||
|
||||
# Should the builtin image and etc. libs be used, or system libs?
|
||||
# Distro specific RPMs should probably set this to 0, generic ones
|
||||
# should use 1
|
||||
%define builtin_libs 1
|
||||
|
||||
# Should --enable-debug_flag be used in release builds?
|
||||
# Using it defines __WXDEBUG__ and gives us runtime diagnostics
|
||||
# that are turned into Python exceptions starting with 2.3.4.
|
||||
%define debug_flag 1
|
||||
|
||||
|
||||
%if %{debug}
|
||||
%define name wxPython%{port}-py%{pyver}-dbg
|
||||
%define othername wxPython%{port}-py%{pyver}
|
||||
%else
|
||||
%define name wxPython%{port}-py%{pyver}
|
||||
%define othername wxPython%{port}-py%{pyver}-dbg
|
||||
%if %{unicode}
|
||||
%define uniflag u
|
||||
%endif
|
||||
|
||||
|
||||
%if %{debug} || %{debug_flag}
|
||||
%define wxconfigname %{wxpref}/bin/wx%{lcport}d-%{ver2}-config
|
||||
%if %{debug_flag}
|
||||
%define wxconfigname %{wxpref}/bin/wx%{lcport}%{uniflag}d-%{ver2}-config
|
||||
%else
|
||||
%define wxconfigname %{wxpref}/bin/wx%{lcport}-%{ver2}-config
|
||||
%define wxconfigname %{wxpref}/bin/wx%{lcport}%{uniflag}-%{ver2}-config
|
||||
%endif
|
||||
|
||||
|
||||
@@ -49,8 +51,6 @@ Provides: wx%{port} = %{version}
|
||||
Provides: wxPython = %{version}
|
||||
|
||||
|
||||
# They conflict with each other, so let them replace each other
|
||||
Obsoletes: %{othername}
|
||||
# old wxPython packages
|
||||
Obsoletes: wxPython
|
||||
|
||||
@@ -65,13 +65,13 @@ This package is implemented using the %{port} port of wxWindows, and
|
||||
includes the wx%{port} shared libs and etc.
|
||||
|
||||
|
||||
%package devel
|
||||
%package -n wxPython%{port}-devel
|
||||
Summary: wxPython%{port} development files
|
||||
Group: Development/Libraries
|
||||
Requires: wxPython%{port} = %{version}
|
||||
|
||||
|
||||
%description devel
|
||||
%description -n wxPython%{port}-devel
|
||||
This packages contains the headers and etc. for building apps or
|
||||
Python extension modules that use the same wx%{port} shared libraries
|
||||
that wxPython uses.
|
||||
@@ -89,77 +89,77 @@ else
|
||||
MAKE="make"
|
||||
fi
|
||||
|
||||
WXDIR=`pwd`
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
# Configure, trying to reduce dependencies
|
||||
../configure --with-%{lcport} \
|
||||
# Configure, trying to reduce external dependencies
|
||||
$WXDIR/configure --with-%{lcport} \
|
||||
--prefix=%{wxpref} \
|
||||
--disable-soname \
|
||||
--enable-rpath=%{wxpref}/lib \
|
||||
--with-opengl \
|
||||
%if %{debug}
|
||||
--enable-debug \
|
||||
%else
|
||||
%if %{unicode}
|
||||
--enable-gtk2 \
|
||||
--enable-unicode \
|
||||
%endif
|
||||
--enable-geometry \
|
||||
--enable-optimise \
|
||||
%if %{debug_flag}
|
||||
--enable-debug_flag \
|
||||
%endif
|
||||
%endif
|
||||
%if %{builtin_libs}
|
||||
--with-libjpeg=builtin \
|
||||
--with-libpng=builtin \
|
||||
--with-libtiff=builtin \
|
||||
--with-zlib=builtin \
|
||||
|
||||
## --enable-debug_flag \
|
||||
## --with-odbc \
|
||||
%endif
|
||||
|
||||
|
||||
# Build wxWindows
|
||||
$MAKE
|
||||
|
||||
cd ../locale
|
||||
cd $WXDIR/locale
|
||||
make allmo
|
||||
|
||||
|
||||
# ** Unfortunately we have to do a bit of installation here so wxPython
|
||||
# can be built. Perhaps wx-config should be changed to be able to be
|
||||
# used from the build dir, maybe with an --inplace flag... Move these
|
||||
# three lines to %install if/when that happens.
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
cd ../build
|
||||
make prefix=$RPM_BUILD_ROOT%{wxpref} install
|
||||
|
||||
|
||||
# Now build wxPython
|
||||
cd ../wxPython
|
||||
cd $WXDIR/wxPython
|
||||
%{python} setup.py \
|
||||
IN_CVS_TREE=1 \
|
||||
NO_SCRIPTS=1 \
|
||||
WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
|
||||
WXPORT=%{lcport} \
|
||||
WX_CONFIG="$WXDIR/build/wx-config --inplace --prefix=$RPM_BUILD_ROOT%{wxpref}" \
|
||||
build
|
||||
|
||||
|
||||
#----------------------------------------------------------------
|
||||
%install
|
||||
%find_lang wxstd
|
||||
cd wxPython
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
# install wxWindows
|
||||
WXDIR=`pwd`
|
||||
cd build
|
||||
make prefix=$RPM_BUILD_ROOT%{wxpref} install
|
||||
|
||||
# install wxPython
|
||||
cd $WXDIR/wxPython
|
||||
%{python} setup.py \
|
||||
IN_CVS_TREE=1 \
|
||||
NO_SCRIPTS=1 \
|
||||
WXPORT=%{lcport} \
|
||||
WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
|
||||
install \
|
||||
--root=$RPM_BUILD_ROOT
|
||||
|
||||
# Since I want this RPM to be as generic as possible I won't let
|
||||
# distutils copy the scripts, since it will mangle the #! line
|
||||
# to use the real python pathname. Since some distros install
|
||||
# python 2.2 as python2 and others as python, then I can't let
|
||||
# it do that otherwise the dependencies will be fouled up. Copy
|
||||
# them manually instead:
|
||||
# distutils copy the scripts since it will mangle the #! line to use
|
||||
# the real python pathname. Since some distros install python 2.2 as
|
||||
# python2 and others as python, then I can't let distutils do that
|
||||
# otherwise the dependencies will be fouled up. Copy them manually
|
||||
# instead, leaving the #!/bin/env line intact:
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||
for s in \
|
||||
helpviewer \
|
||||
img2png \
|
||||
img2py \
|
||||
img2xpm \
|
||||
@@ -170,6 +170,29 @@ for s in \
|
||||
done
|
||||
|
||||
|
||||
# Generate the filelists. For some reason the %defattr below is still
|
||||
# resulting in many (but not all) files not owned by root when just
|
||||
# specifying directories and wildcards to be included in each package.
|
||||
# So instead we'll build some explicit filelists here and use %attr on
|
||||
# each entry.
|
||||
cd $WXDIR
|
||||
mkdir -p $RPM_BUILD_ROOT%{pref}/share/doc
|
||||
GFL="%{python} wxPython/distrib/genfilelist.py"
|
||||
$GFL $RPM_BUILD_ROOT %{pref} > FILELIST
|
||||
$GFL -r $RPM_BUILD_ROOT %{pref}/bin >> FILELIST
|
||||
$GFL $RPM_BUILD_ROOT %{pref}/lib >> FILELIST
|
||||
$GFL -r $RPM_BUILD_ROOT %{pref}/lib/python%{pyver} >> FILELIST
|
||||
$GFL -r $RPM_BUILD_ROOT %{pref}/share >> FILELIST
|
||||
$GFL $RPM_BUILD_ROOT %{wxpref} >> FILELIST
|
||||
$GFL $RPM_BUILD_ROOT %{wxpref}/lib >> FILELIST
|
||||
$GFL $RPM_BUILD_ROOT "%{wxpref}/lib/libwx*" >> FILELIST
|
||||
$GFL -r $RPM_BUILD_ROOT %{wxpref}/share >> FILELIST
|
||||
|
||||
$GFL $RPM_BUILD_ROOT %{wxpref}/include > DEVELLIST
|
||||
$GFL -r $RPM_BUILD_ROOT %{wxpref}/include/wx >> DEVELLIST
|
||||
$GFL -r $RPM_BUILD_ROOT %{wxpref}/lib/wx >> DEVELLIST
|
||||
$GFL $RPM_BUILD_ROOT %{wxconfigname} >> DEVELLIST
|
||||
$GFL $RPM_BUILD_ROOT %{wxpref}/bin/wx-config >> DEVELLIST
|
||||
|
||||
|
||||
#----------------------------------------------------------------
|
||||
@@ -178,37 +201,15 @@ done
|
||||
|
||||
|
||||
#----------------------------------------------------------------
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
|
||||
#----------------------------------------------------------------
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------
|
||||
%files
|
||||
%doc docs/preamble.txt
|
||||
%doc docs/licence.txt
|
||||
%doc docs/readme.txt
|
||||
%doc docs/changes.txt
|
||||
%doc wxPython/README.txt
|
||||
%doc wxPython/CHANGES.txt
|
||||
%files -f FILELIST
|
||||
%defattr(-,root,root)
|
||||
%{wxpref}/lib/libwx*
|
||||
%{pref}/lib/python*
|
||||
%{wxpref}/share/
|
||||
%{pref}/bin/*
|
||||
%doc docs/preamble.txt docs/licence.txt docs/readme.txt docs/changes.txt
|
||||
%doc wxPython/README.txt wxPython/CHANGES.txt
|
||||
|
||||
|
||||
%files devel
|
||||
%files -n wxPython%{port}-devel -f DEVELLIST
|
||||
%defattr(-,root,root)
|
||||
%{wxpref}/include/wx
|
||||
%{wxpref}/lib/wx
|
||||
%{wxconfigname}
|
||||
%{wxpref}/bin/wx-config
|
||||
|
||||
|
||||
#----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user