3 # Are we using bash on win32? If so source that file and then exit.
4 if [ "$OSTYPE" = "cygwin" ]; then
9 # make it easy to switch versions of SWIG
10 if [ "$SWIG" = "" ]; then
11 SWIG
=/opt
/swig
/bin
/swig
-1.3
.29
16 if [ "$1" = "15" ]; then
18 elif [ "$1" = "20" ]; then
20 elif [ "$1" = "21" ]; then
22 elif [ "$1" = "22" ]; then
24 elif [ "$1" = "23" ]; then
26 elif [ "$1" = "24" ]; then
29 echo You must specify Python version as first parameter.
37 python
$PYVER -c "import sys;print '\n', sys.version, '\n'"
40 SETUP
="python$PYVER -u setup.py"
41 FLAGS
="USE_SWIG=1 SWIG=$SWIG"
48 if [ "$1" = "gtk1" -o "$1" = "gtk" ]; then
49 PORTFLAGS
="WXPORT=gtk"
52 elif [ "$1" = "gtk2" ]; then
53 PORTFLAGS
="WXPORT=gtk2"
59 if [ "$p" = "UNICODE=0" -o "$p" = "UNICODE=1" ]; then
65 FLAGS
="$FLAGS $PORTFLAGS $UNIFLAG"
70 if [ "$1" = "c" ]; then
72 CMD
="$SETUP $FLAGS $OTHERFLAGS clean $*"
73 OTHERCMD
="rm -f wx/*.so"
75 # "d" --> clean extension modules only
76 elif [ "$1" = "d" ]; then
80 # "t" --> touch *.i files
81 elif [ "$1" = "t" ]; then
83 CMD
='find . -name "*.i" | xargs touch'
86 elif [ "$1" = "i" ]; then
88 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext install $*"
91 elif [ "$1" = "s" ]; then
93 CMD
="$SETUP $OTHERFLAGS sdist $*"
96 elif [ "$1" = "r" ]; then
97 WXPYVER
=`python$PYVER -c "import setup;print setup.VERSION"`
101 echo "*****************************************************************"
102 echo "******* Building wxPython for Python $PYVER"
103 echo "*****************************************************************"
105 SETUP
="python$PYVER -u setup.py"
108 cp setup.py setup.py.save
110 # fix up setup.py the way we want...
111 sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save
> setup.py.temp
112 sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp
> setup.py
114 # build wxPython-gl RPM
115 $SETUP $OTHERFLAGS bdist_rpm
--binary-only --doc-files README.txt
--python=python
$PYVER
116 ### --requires=python$PYVER
117 rm dist
/wxPython
-gl*.
tar.gz
120 cp setup.py setup.py.temp
121 sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp
> setup.py
122 $SETUP $OTHERFLAGS bdist_rpm
--binary-only --python=python
$PYVER
123 ### --requires=python$PYVER
125 # put the oringal setup.py back
126 cp setup.py.save setup.py
129 # rename the binary RPM's
130 mv dist
/wxPython
-$WXPYVER-1.i386.rpm dist
/wxPython
-$WXPYVER-1-Py$VER.i386.rpm
131 mv dist
/wxPython
-gl-$WXPYVER-1.i386.rpm dist
/wxPython
-gl-$WXPYVER-1-Py$VER.i386.rpm
135 # rebuild the source dists without the munched up setup.py
136 $SETUP $OTHERFLAGS bdist_rpm
--source-only
140 # "f" --> FINAL (no debug)
141 elif [ "$1" = "f" ]; then
143 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*"
145 # (no command arg) --> normal build for development
147 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace --debug $*"
155 if [ "$RC" = "0" -a "$OTHERCMD" != "" ]; then