4     if [ "$1" = "15" ]; then 
   6     elif [ "$1" = "20" ]; then 
   8     elif [ "$1" = "21" ]; then 
  10     elif [ "$1" = "22" ]; then 
  13         echo You must specify Python version as first parameter.
 
  21 python
$PYVER -c "import sys;print '\n', sys.version, '\n'" 
  24 SETUP
="python$PYVER -u setup.py" 
  25 FLAGS
="USE_SWIG=1 IN_CVS_TREE=1" # BUILD_GLCANVAS=0" 
  31 if [ "$1" =  "c" ]; then 
  33     CMD
="$SETUP $FLAGS $OTHERFLAGS clean" 
  34     OTHERCMD
="rm -f wxPython/*.so" 
  36 # "d" --> clean extension modules only 
  37 elif [ "$1" = "d" ]; then 
  39     CMD
="rm -f wxPython/*.so" 
  41 # "t" --> touch *.i files 
  42 elif [ "$1" = "t" ]; then 
  44     #CMD="set CMD=touch src\*.i; touch contrib\glcanvas\*.i; touch contrib\ogl\*.i; touch contrib\stc\*.i" 
  45     CMD
='find . -name "*.i" | xargs touch' 
  48 elif [ "$1" = "i" ]; then 
  50     CMD
="$SETUP $FLAGS $OTHERFLAGS install" 
  53 elif [ "$1" = "s" ]; then 
  55     CMD
="$SETUP $OTHERFLAGS sdist" 
  58 elif [ "$1" = "r" ]; then 
  59     WXPYVER
=`python$PYVER -c "import setup;print setup.VERSION"` 
  63         echo "*****************************************************************" 
  64         echo "*******      Building wxPython for Python $PYVER" 
  65         echo "*****************************************************************" 
  67         SETUP
="python$PYVER -u setup.py" 
  70         cp setup.py setup.py.save
 
  72         # fix up setup.py the way we want... 
  73         sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save 
> setup.py.temp
 
  74         sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp 
> setup.py
 
  76         # build wxPython-gl RPM 
  77         $SETUP $OTHERFLAGS bdist_rpm 
--binary-only --doc-files README.txt 
--python=python
$PYVER 
  78                         ### --requires=python$PYVER 
  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 --python=python
$PYVER 
  85                         ### --requires=python$PYVER 
  87         # put the oringal setup.py back 
  88         cp setup.py.save setup.py
 
  91         # rename the binary RPM's 
  92         mv dist
/wxPython
-$WXPYVER-1.i386.rpm dist
/wxPython
-$WXPYVER-1-Py$VER.i386.rpm
 
  93         mv dist
/wxPython
-gl-$WXPYVER-1.i386.rpm dist
/wxPython
-gl-$WXPYVER-1-Py$VER.i386.rpm
 
  97     # rebuild the source dists without the munched up setup.py 
  98     $SETUP $OTHERFLAGS bdist_rpm 
--source-only 
 102 # "f" --> FINAL (no debug) 
 103 elif [ "$1" = "f" ]; then 
 105     CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*" 
 107 # (no command arg) --> normal build for development 
 109     CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace --debug $*" 
 117 if [ "$OTHERCMD" != "" ]; then