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" # BUILD_GLCANVAS=0"
32 if [ "$1" = "c" ]; then
34 CMD
="$SETUP $FLAGS $OTHERFLAGS clean $*"
35 OTHERCMD
="rm -f wx/*.so"
37 # "d" --> clean extension modules only
38 elif [ "$1" = "d" ]; then
42 # "t" --> touch *.i files
43 elif [ "$1" = "t" ]; then
45 #CMD="set CMD=touch src\*.i; touch contrib\glcanvas\*.i; touch contrib\ogl\*.i; touch contrib\stc\*.i"
46 CMD
='find . -name "*.i" | xargs touch'
49 elif [ "$1" = "i" ]; then
51 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext install $*"
54 elif [ "$1" = "s" ]; then
56 CMD
="$SETUP $OTHERFLAGS sdist $*"
59 elif [ "$1" = "r" ]; then
60 WXPYVER
=`python$PYVER -c "import setup;print setup.VERSION"`
64 echo "*****************************************************************"
65 echo "******* Building wxPython for Python $PYVER"
66 echo "*****************************************************************"
68 SETUP
="python$PYVER -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
--python=python
$PYVER
79 ### --requires=python$PYVER
80 rm dist
/wxPython
-gl*.
tar.gz
83 cp setup.py setup.py.temp
84 sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp
> setup.py
85 $SETUP $OTHERFLAGS bdist_rpm
--binary-only --python=python
$PYVER
86 ### --requires=python$PYVER
88 # put the oringal setup.py back
89 cp setup.py.save setup.py
92 # rename the binary RPM's
93 mv dist
/wxPython
-$WXPYVER-1.i386.rpm dist
/wxPython
-$WXPYVER-1-Py$VER.i386.rpm
94 mv dist
/wxPython
-gl-$WXPYVER-1.i386.rpm dist
/wxPython
-gl-$WXPYVER-1-Py$VER.i386.rpm
98 # rebuild the source dists without the munched up setup.py
99 $SETUP $OTHERFLAGS bdist_rpm
--source-only
103 # "f" --> FINAL (no debug)
104 elif [ "$1" = "f" ]; then
106 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*"
108 # (no command arg) --> normal build for development
110 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace --debug $*"
118 if [ "$OTHERCMD" != "" ]; then