4 if [ "$1" = "15" ]; then
6 elif [ "$1" = "20" ]; then
8 elif [ "$1" = "21" ]; then
11 echo You must specify Python version as first parameter.
19 python
$PYVER -c "import sys;print '\n', sys.version, '\n'"
21 WXPYVER
=`python$PYVER -c "import setup;print setup.VERSION"`
22 SETUP
="python$PYVER -u setup.py"
23 FLAGS
="USE_SWIG=1 IN_CVS_TREE=1"
29 if [ "$1" = "c" ]; then
31 CMD
="$SETUP $FLAGS $OTHERFLAGS clean"
32 OTHERCMD
="rm -f wxPython/*.so"
34 # "d" --> clean extension modules only
35 elif [ "$1" = "d" ]; then
37 CMD
="rm -f wxPython/*.so"
39 # "t" --> touch *.i files
40 elif [ "$1" = "t" ]; then
42 CMD
="set CMD=touch src\*.i; touch contrib\glcanvas\*.i; touch contrib\ogl\*.i; touch contrib\stc\*.i"
45 elif [ "$1" = "i" ]; then
47 CMD
="$SETUP build $OTHERFLAGS install"
50 elif [ "$1" = "s" ]; then
52 CMD
="$SETUP $OTHERFLAGS sdist"
55 elif [ "$1" = "r" ]; then
57 for VER
in 15 20 21; do
60 echo "*****************************************************************"
61 echo "******* Building wxPython for Python $PYVER"
62 echo "*****************************************************************"
64 # NOTE: This assumes that /usr/local/bin is BEFORE /usr/bin on the PATH
65 # AND that you have write access to it.
66 rm -f /usr
/local
/bin
/python
67 ln -s /usr
/bin
/python
$PYVER /usr
/local
/bin
/python
68 SETUP
="/usr/local/bin/python -u setup.py"
71 cp setup.py setup.py.save
73 # fix up setup.py the way we want...
74 sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save
> setup.py.temp
75 sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp
> setup.py
77 # build wxPython-gl RPM
78 $SETUP $OTHERFLAGS bdist_rpm
--binary-only --doc-files README.txt
79 rm dist
/wxPython
-gl*.
tar.gz
82 cp setup.py setup.py.temp
83 sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp
> setup.py
84 $SETUP $OTHERFLAGS bdist_rpm
--binary-only
86 # put the oringal setup.py back
87 cp setup.py.save setup.py
90 # rename the binary RPM's
91 mv dist
/wxPython
-$WXPYVER-1.i386.rpm dist
/wxPython
-$WXPYVER-1-Py$VER.i386.rpm
92 mv dist
/wxPython
-gl-$WXPYVER-1.i386.rpm dist
/wxPython
-gl-$WXPYVER-1-Py$VER.i386.rpm
95 # rebuild the source dists without the munched up setup.py
96 $SETUP $OTHERFLAGS sdist
97 $SETUP $OTHERFLAGS bdist_rpm
--source-only
101 # "f" --> FINAL (no debug)
102 elif [ "$1" = "f" ]; then
104 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*"
106 # (no command arg) --> normal build for development
108 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace --debug $*"
116 if [ "$OTHERCMD" != "" ]; then