3 # Are we using bash on win32?  If so source that file and then exit. 
   4 if [ "$OSTYPE" = "cygwin" ]; then 
  11     if [ "$1" = "15" ]; then 
  13     elif [ "$1" = "20" ]; then 
  15     elif [ "$1" = "21" ]; then 
  17     elif [ "$1" = "22" ]; then 
  19     elif [ "$1" = "23" ]; then 
  22         echo You must specify Python version as first parameter.
 
  30 python
$PYVER -c "import sys;print '\n', sys.version, '\n'" 
  33 SETUP
="python$PYVER -u setup.py" 
  34 FLAGS
="USE_SWIG=1 SWIG=/opt/swig/bin/swig"  
  40 if [ "$1" = "gtk1" -o "$1" = "gtk" ]; then  
  41     PORTFLAGS
="WXPORT=gtk UNICODE=0" 
  43 elif [ "$1" = "gtk2" ]; then  
  44     PORTFLAGS
="WXPORT=gtk2 UNICODE=1" 
  48 FLAGS
="$FLAGS $PORTFLAGS" 
  54 if [ "$1" =  "c" ]; then 
  56     CMD
="$SETUP $FLAGS $OTHERFLAGS clean $*" 
  57     OTHERCMD
="rm -f wx/*.so" 
  59 # "d" --> clean extension modules only 
  60 elif [ "$1" = "d" ]; then 
  64 # "t" --> touch *.i files 
  65 elif [ "$1" = "t" ]; then 
  67     CMD
='find . -name "*.i" | xargs touch' 
  70 elif [ "$1" = "i" ]; then 
  72     CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext install $*" 
  75 elif [ "$1" = "s" ]; then 
  77     CMD
="$SETUP $OTHERFLAGS sdist $*" 
  80 elif [ "$1" = "r" ]; then 
  81     WXPYVER
=`python$PYVER -c "import setup;print setup.VERSION"` 
  85         echo "*****************************************************************" 
  86         echo "*******      Building wxPython for Python $PYVER" 
  87         echo "*****************************************************************" 
  89         SETUP
="python$PYVER -u setup.py" 
  92         cp setup.py setup.py.save
 
  94         # fix up setup.py the way we want... 
  95         sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save 
> setup.py.temp
 
  96         sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp 
> setup.py
 
  98         # build wxPython-gl RPM 
  99         $SETUP $OTHERFLAGS bdist_rpm 
--binary-only --doc-files README.txt 
--python=python
$PYVER 
 100                         ### --requires=python$PYVER 
 101         rm dist
/wxPython
-gl*.
tar.gz
 
 104         cp setup.py setup.py.temp
 
 105         sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp 
> setup.py
 
 106         $SETUP $OTHERFLAGS bdist_rpm 
--binary-only --python=python
$PYVER 
 107                         ### --requires=python$PYVER 
 109         # put the oringal setup.py back 
 110         cp setup.py.save setup.py
 
 113         # rename the binary RPM's 
 114         mv dist
/wxPython
-$WXPYVER-1.i386.rpm dist
/wxPython
-$WXPYVER-1-Py$VER.i386.rpm
 
 115         mv dist
/wxPython
-gl-$WXPYVER-1.i386.rpm dist
/wxPython
-gl-$WXPYVER-1-Py$VER.i386.rpm
 
 119     # rebuild the source dists without the munched up setup.py 
 120     $SETUP $OTHERFLAGS bdist_rpm 
--source-only 
 124 # "f" --> FINAL (no debug) 
 125 elif [ "$1" = "f" ]; then 
 127     CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*" 
 129 # (no command arg) --> normal build for development 
 131     CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace --debug $*" 
 139 if [ "$RC" = "0" -a  "$OTHERCMD" != "" ]; then