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 IN_CVS_TREE=1" # BUILD_GLCANVAS=0"
33 if [ "$1" = "c" ]; then
35 CMD
="$SETUP $FLAGS $OTHERFLAGS clean $*"
36 OTHERCMD
="rm -f wxPython/*.so"
38 # "d" --> clean extension modules only
39 elif [ "$1" = "d" ]; then
41 CMD
="rm -f wxPython/*.so"
43 # "t" --> touch *.i files
44 elif [ "$1" = "t" ]; then
46 #CMD="set CMD=touch src\*.i; touch contrib\glcanvas\*.i; touch contrib\ogl\*.i; touch contrib\stc\*.i"
47 CMD
='find . -name "*.i" | xargs touch'
50 elif [ "$1" = "i" ]; then
52 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext install $*"
55 elif [ "$1" = "s" ]; then
57 CMD
="$SETUP $OTHERFLAGS sdist $*"
60 elif [ "$1" = "r" ]; then
61 WXPYVER
=`python$PYVER -c "import setup;print setup.VERSION"`
65 echo "*****************************************************************"
66 echo "******* Building wxPython for Python $PYVER"
67 echo "*****************************************************************"
69 SETUP
="python$PYVER -u setup.py"
72 cp setup.py setup.py.save
74 # fix up setup.py the way we want...
75 sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save
> setup.py.temp
76 sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp
> setup.py
78 # build wxPython-gl RPM
79 $SETUP $OTHERFLAGS bdist_rpm
--binary-only --doc-files README.txt
--python=python
$PYVER
80 ### --requires=python$PYVER
81 rm dist
/wxPython
-gl*.
tar.gz
84 cp setup.py setup.py.temp
85 sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp
> setup.py
86 $SETUP $OTHERFLAGS bdist_rpm
--binary-only --python=python
$PYVER
87 ### --requires=python$PYVER
89 # put the oringal setup.py back
90 cp setup.py.save setup.py
93 # rename the binary RPM's
94 mv dist
/wxPython
-$WXPYVER-1.i386.rpm dist
/wxPython
-$WXPYVER-1-Py$VER.i386.rpm
95 mv dist
/wxPython
-gl-$WXPYVER-1.i386.rpm dist
/wxPython
-gl-$WXPYVER-1-Py$VER.i386.rpm
99 # rebuild the source dists without the munched up setup.py
100 $SETUP $OTHERFLAGS bdist_rpm
--source-only
104 # "f" --> FINAL (no debug)
105 elif [ "$1" = "f" ]; then
107 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*"
109 # (no command arg) --> normal build for development
111 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace --debug $*"
119 if [ "$OTHERCMD" != "" ]; then