]> git.saurik.com Git - wxWidgets.git/blob - wxPython/b
added wxDir::Traverse
[wxWidgets.git] / wxPython / b
1 #!/bin/sh
2
3 if [ "$1" = "15" ]; then
4 PYVER=1.5
5 shift
6 elif [ "$1" = "20" ]; then
7 PYVER=2.0
8 shift
9 elif [ "$1" = "21" ]; then
10 PYVER=2.1
11 shift
12 else
13 echo You must specify Python version as first parameter.
14 exit
15 fi
16
17
18 SETUP="python$PYVER -u setup.py"
19 FLAGS="USE_SWIG=1 IN_CVS_TREE=1"
20 OTHERFLAGS=""
21
22
23
24 # "c" --> clean
25 if [ "$1" = "c" ]; then
26 shift
27 CMD="$SETUP $FLAGS $OTHERFLAGS clean"
28 OTHERCMD="rm -f wxPython/*.so"
29
30 # "d" --> clean extension modules only
31 elif [ "$1" = "d" ]; then
32 shift
33 CMD="rm -f wxPython/*.so"
34
35 # "i" --> install
36 elif [ "$1" = "i" ]; then
37 shift
38 CMD="$SETUP build $OTHERFLAGS install"
39
40 # "s" --> source dist
41 elif [ "$1" = "s" ]; then
42 shift
43 CMD="$SETUP $OTHERFLAGS sdist"
44
45 # "r" --> rpm dist
46 elif [ "$1" = "r" ]; then
47
48 # save the original
49 cp setup.py setup.py.save
50
51 # fix up setup.py the way we want...
52 sed "s/BUILD_GLCANVAS = /BUILD_GLCANVAS = 0 #/" < setup.py.save > setup.py.temp
53 sed "s/GL_ONLY = /GL_ONLY = 1 #/" < setup.py.temp > setup.py
54
55 # build wxPython-gl RPM
56 $SETUP $OTHERFLAGS bdist_rpm --binary-only --doc-files README.txt
57 rm dist/wxPython-gl*.tar.gz
58
59 # Build wxPython RPM
60 cp setup.py setup.py.temp
61 sed "s/GL_ONLY = /GL_ONLY = 0 #/" < setup.py.temp > setup.py
62 $SETUP $OTHERFLAGS bdist_rpm
63
64 # put the oringal back
65 cp setup.py.save setup.py
66 rm setup.py.*
67
68 # rebuild the source dist without the munched up setup.py
69 $SETUP $OTHERFLAGS sdist
70 exit 0
71
72
73 # (no command arg) --> normal build for development
74 else
75 CMD="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*"
76 fi
77
78
79 echo $CMD
80 $CMD
81
82
83 if [ "$OTHERCMD" != "" ]; then
84 echo $OTHERCMD
85 $OTHERCMD
86 fi
87