]> git.saurik.com Git - wxWidgets.git/blame - wxPython/b
Implemented the first phase of OOR (Original Object Return). See the
[wxWidgets.git] / wxPython / b
CommitLineData
c368d904
RD
1#!/bin/sh
2
3if [ "$1" = "15" ]; then
4 PYVER=1.5
5 shift
6elif [ "$1" = "20" ]; then
7 PYVER=2.0
8 shift
9e689c06
RD
9elif [ "$1" = "21" ]; then
10 PYVER=2.1
11 shift
9df61a29
RD
12else
13 echo You must specify Python version as first parameter.
14 exit
c368d904
RD
15fi
16
17
18SETUP="python$PYVER -u setup.py"
19FLAGS="USE_SWIG=1 IN_CVS_TREE=1"
20OTHERFLAGS=""
21
22
23
24# "c" --> clean
25if [ "$1" = "c" ]; then
26 shift
27 CMD="$SETUP $FLAGS $OTHERFLAGS clean"
28 OTHERCMD="rm -f wxPython/*.so"
29
9e689c06
RD
30# "d" --> clean extension modules only
31elif [ "$1" = "d" ]; then
32 shift
33 CMD="rm -f wxPython/*.so"
34
c368d904
RD
35# "i" --> install
36elif [ "$1" = "i" ]; then
37 shift
38 CMD="$SETUP build $OTHERFLAGS install"
39
40# "s" --> source dist
41elif [ "$1" = "s" ]; then
42 shift
43 CMD="$SETUP $OTHERFLAGS sdist"
44
45# "r" --> rpm dist
46elif [ "$1" = "r" ]; then
1b62f00d
RD
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
c368d904
RD
72
73# (no command arg) --> normal build for development
74else
75 CMD="$SETUP $FLAGS $OTHERFLAGS build_ext --inplace $*"
76fi
77
78
79echo $CMD
80$CMD
81
82
83if [ "$OTHERCMD" != "" ]; then
84 echo $OTHERCMD
85 $OTHERCMD
86fi
87