4 if [ "$1" = "15" ]; then
6 elif [ "$1" = "20" ]; then
8 elif [ "$1" = "21" ]; then
10 elif [ "$1" = "22" ]; then
12 elif [ "$1" = "23" ]; then
15 echo You must specify Python version as first parameter.
23 python
$PYVER -c "import sys;print '\n', sys.version, '\n'"
26 SETUP
="python$PYVER -u setup.py"
27 FLAGS
="USE_SWIG=1 SWIG=/opt/swig/bin/swig"
32 if [ "$1" = "gtk1" ]; then
35 elif [ "$1" = "gtk2" ]; then
36 PORTFLAGS
="WXPORT=gtk2 UNICODE=1"
40 FLAGS
="$FLAGS $PORTFLAGS"
46 if [ "$1" = "c" ]; then
48 CMD
="$SETUP $FLAGS $OTHERFLAGS clean $*"
49 OTHERCMD
="rm -f wx/*.so"
51 # "d" --> clean extension modules only
52 elif [ "$1" = "d" ]; then
56 # "t" --> touch *.i files
57 elif [ "$1" = "t" ]; then
59 CMD
='find . -name "*.i" | xargs touch'
62 elif [ "$1" = "i" ]; then
64 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext install $*"
67 elif [ "$1" = "s" ]; then
69 CMD
="$SETUP $OTHERFLAGS sdist $*"
72 elif [ "$1" = "r" ]; then
73 WXPYVER
=`python$PYVER -c "import setup;print setup.VERSION"`
77 echo "*****************************************************************"
78 echo "******* Building wxPython for Python $PYVER"
79 echo "*****************************************************************"
81 SETUP
="python$PYVER -u setup.py"
84 cp setup.py setup.py.save
86 # fix up setup.py the way we want...
87 sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save
> setup.py.temp
88 sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp
> setup.py
90 # build wxPython-gl RPM
91 $SETUP $OTHERFLAGS bdist_rpm
--binary-only --doc-files README.txt
--python=python
$PYVER
92 ### --requires=python$PYVER
93 rm dist
/wxPython
-gl*.
tar.gz
96 cp setup.py setup.py.temp
97 sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp
> setup.py
98 $SETUP $OTHERFLAGS bdist_rpm
--binary-only --python=python
$PYVER
99 ### --requires=python$PYVER
101 # put the oringal setup.py back
102 cp setup.py.save setup.py
105 # rename the binary RPM's
106 mv dist
/wxPython
-$WXPYVER-1.i386.rpm dist
/wxPython
-$WXPYVER-1-Py$VER.i386.rpm
107 mv dist
/wxPython
-gl-$WXPYVER-1.i386.rpm dist
/wxPython
-gl-$WXPYVER-1-Py$VER.i386.rpm
111 # rebuild the source dists without the munched up setup.py
112 $SETUP $OTHERFLAGS bdist_rpm
--source-only
116 # "f" --> FINAL (no debug)
117 elif [ "$1" = "f" ]; then
119 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*"
121 # (no command arg) --> normal build for development
123 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace --debug $*"
131 if [ "$RC" = "0" -a "$OTHERCMD" != "" ]; then