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
21 elif [ "$1" = "24" ]; then
24 echo You must specify Python version as first parameter.
32 python
$PYVER -c "import sys;print '\n', sys.version, '\n'"
35 SETUP
="python$PYVER -u setup.py"
36 FLAGS
="USE_SWIG=1 SWIG=/opt/swig/bin/swig"
43 if [ "$1" = "gtk1" -o "$1" = "gtk" ]; then
44 PORTFLAGS
="WXPORT=gtk"
47 elif [ "$1" = "gtk2" ]; then
48 PORTFLAGS
="WXPORT=gtk2"
54 if [ "$p" = "UNICODE=0" -o "$p" = "UNICODE=1" ]; then
60 FLAGS
="$FLAGS $PORTFLAGS $UNIFLAG"
66 if [ "$1" = "c" ]; then
68 CMD
="$SETUP $FLAGS $OTHERFLAGS clean $*"
69 OTHERCMD
="rm -f wx/*.so"
71 # "d" --> clean extension modules only
72 elif [ "$1" = "d" ]; then
76 # "t" --> touch *.i files
77 elif [ "$1" = "t" ]; then
79 CMD
='find . -name "*.i" | xargs touch'
82 elif [ "$1" = "i" ]; then
84 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext install $*"
87 elif [ "$1" = "s" ]; then
89 CMD
="$SETUP $OTHERFLAGS sdist $*"
92 elif [ "$1" = "r" ]; then
93 WXPYVER
=`python$PYVER -c "import setup;print setup.VERSION"`
97 echo "*****************************************************************"
98 echo "******* Building wxPython for Python $PYVER"
99 echo "*****************************************************************"
101 SETUP
="python$PYVER -u setup.py"
104 cp setup.py setup.py.save
106 # fix up setup.py the way we want...
107 sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save
> setup.py.temp
108 sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp
> setup.py
110 # build wxPython-gl RPM
111 $SETUP $OTHERFLAGS bdist_rpm
--binary-only --doc-files README.txt
--python=python
$PYVER
112 ### --requires=python$PYVER
113 rm dist
/wxPython
-gl*.
tar.gz
116 cp setup.py setup.py.temp
117 sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp
> setup.py
118 $SETUP $OTHERFLAGS bdist_rpm
--binary-only --python=python
$PYVER
119 ### --requires=python$PYVER
121 # put the oringal setup.py back
122 cp setup.py.save setup.py
125 # rename the binary RPM's
126 mv dist
/wxPython
-$WXPYVER-1.i386.rpm dist
/wxPython
-$WXPYVER-1-Py$VER.i386.rpm
127 mv dist
/wxPython
-gl-$WXPYVER-1.i386.rpm dist
/wxPython
-gl-$WXPYVER-1-Py$VER.i386.rpm
131 # rebuild the source dists without the munched up setup.py
132 $SETUP $OTHERFLAGS bdist_rpm
--source-only
136 # "f" --> FINAL (no debug)
137 elif [ "$1" = "f" ]; then
139 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*"
141 # (no command arg) --> normal build for development
143 CMD
="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace --debug $*"
151 if [ "$RC" = "0" -a "$OTHERCMD" != "" ]; then