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