Mercurial > cpython-lru_cache-weakref
annotate Mac/scripts/fullbuild.py @ 27998:e27f58a50737 legacy-trunk
SF bug #690377: Dud footnote reference in distutils docs
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Fri, 21 Feb 2003 02:47:09 +0000 |
| parents | caa6df9e0880 |
| children | 31a511f74b28 |
| rev | line source |
|---|---|
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1 # |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2 # fullbuild creates everything that needs to be created before a |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3 # distribution can be made, and puts it all in the right place. |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
4 # |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
5 # It expects the projects to be in the places where Jack likes them: |
|
6211
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
6 # in directories named like 'build.mac'. That is fixable, |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
7 # however. |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
8 # |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
9 # NOTE: You should proably make a copy of python with which to execute this |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
10 # script, rebuilding running programs does not work... |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
11 |
|
24022
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
12 CARBON_ONLY = 1 |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
13 |
|
6211
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
14 MACBUILDNO=":Mac:Include:macbuildno.h" |
|
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
15 |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
16 import os |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
17 import sys |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
18 import macfs |
|
3408
397e6d53a7ad
- AppleEvent timeout set to infinite
Jack Jansen <jack.jansen@cwi.nl>
parents:
3185
diff
changeset
|
19 import MacOS |
|
3502
61894ba571f5
Changed to allow the user to do partial builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
3462
diff
changeset
|
20 import EasyDialogs |
|
15696
57a4857430ff
Use re in stead of regex.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15683
diff
changeset
|
21 import re |
|
6211
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
22 import string |
|
19321
42246b8c58bb
If genpluginprojects is called from fullbuild we set the Python source directory to be the same as fullbuild uses (in stead of using the default sys.prefix). This fixes an issue Mark Day raised that you can't use fullbuild with one Python installation to build another one.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19024
diff
changeset
|
23 import genpluginprojects |
|
19515
546ef318ba5d
Use the new macresource module to open the accompanying resource file (if needed).
Jack Jansen <jack.jansen@cwi.nl>
parents:
19488
diff
changeset
|
24 import macresource |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
25 |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
26 import aetools |
|
19488
42b2f1936254
Import the MacOS toolbox modules from the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19441
diff
changeset
|
27 from Carbon import AppleEvents |
|
14028
5b0f3c40060f
Use the new package-based scripting support.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13699
diff
changeset
|
28 |
|
24022
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
29 import CodeWarrior |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
30 |
|
19488
42b2f1936254
Import the MacOS toolbox modules from the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19441
diff
changeset
|
31 from Carbon import Res |
|
42b2f1936254
Import the MacOS toolbox modules from the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19441
diff
changeset
|
32 from Carbon import Dlg |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
33 |
|
8800
e8b56b387045
Use buildtools where appropriate.
Jack Jansen <jack.jansen@cwi.nl>
parents:
8107
diff
changeset
|
34 import buildtools |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
35 import cfmfile |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
36 |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
37 # Dialog resource. Note that the item numbers should correspond |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
38 # to those in the DITL resource. Also note that the order is important: |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
39 # things are built in this order, so there should be no forward dependencies. |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
40 DIALOG_ID = 512 |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
41 |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
42 I_OK=1 |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
43 I_CANCEL=2 |
| 15701 | 44 # label 3 |
| 45 I_PPC_EXTLIBS=4 | |
| 46 I_GEN_PROJECTS=5 | |
|
16087
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
47 I_GEN_PROJECTS_FORCE=6 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
48 I_GEN_IMGPROJECTS=7 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
49 I_GEN_IMGPROJECTS_FORCE=8 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
50 I_INC_BUILDNO=9 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
51 # label 10 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
52 I_PPC_CORE=11 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
53 I_PPC_PLUGINS=12 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
54 I_PPC_EXTENSIONS=13 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
55 # label 14 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
56 I_CARBON_CORE=15 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
57 I_CARBON_PLUGINS=16 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
58 I_CARBON_EXTENSIONS=17 |
|
16565
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
59 I_INTERPRETER=18 |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
60 # label 19 |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
61 I_PPC_FULL=20 |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
62 I_PPC_SMALL=21 |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
63 # label 22 |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
64 I_CARBON_FULL=23 |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
65 I_CARBON_SMALL=24 |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
66 # label 25 |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
67 I_APPLETS=26 |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
68 |
|
16565
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
69 N_BUTTONS=27 |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
70 |
|
24022
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
71 if CARBON_ONLY: |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
72 BUTTONS_DISABLE = [ |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
73 I_PPC_EXTLIBS, |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
74 I_PPC_CORE, |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
75 I_PPC_PLUGINS, |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
76 I_PPC_EXTENSIONS, |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
77 I_INTERPRETER, |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
78 I_PPC_FULL, |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
79 I_PPC_SMALL, |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
80 ] |
|
14028
5b0f3c40060f
Use the new package-based scripting support.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13699
diff
changeset
|
81 else: |
|
24022
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
82 BUTTONS_DISABLE = [] |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
83 |
|
3502
61894ba571f5
Changed to allow the user to do partial builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
3462
diff
changeset
|
84 RUNNING=[] |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
85 |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
86 def buildmwproject(top, creator, projects): |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
87 """Build projects with an MW compiler""" |
|
24022
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
88 mgr = CodeWarrior.CodeWarrior(creator, start=1) |
|
3408
397e6d53a7ad
- AppleEvent timeout set to infinite
Jack Jansen <jack.jansen@cwi.nl>
parents:
3185
diff
changeset
|
89 mgr.send_timeout = AppleEvents.kNoTimeOut |
|
397e6d53a7ad
- AppleEvent timeout set to infinite
Jack Jansen <jack.jansen@cwi.nl>
parents:
3185
diff
changeset
|
90 |
|
13699
026e12ac9f71
If any of the builds in a group fails offer to stop the fullbuild process and open the failing projects in codewarrior.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13397
diff
changeset
|
91 failed = [] |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
92 for file in projects: |
|
6173
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
93 if type(file) == type(()): |
|
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
94 file, target = file |
|
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
95 else: |
|
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
96 target = '' |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
97 file = os.path.join(top, file) |
|
10042
f2c072b05466
added some try/excepts so it also works when certain projects/folders are not available -- jvr
Just van Rossum <just@lettererror.com>
parents:
9990
diff
changeset
|
98 try: |
|
f2c072b05466
added some try/excepts so it also works when certain projects/folders are not available -- jvr
Just van Rossum <just@lettererror.com>
parents:
9990
diff
changeset
|
99 fss = macfs.FSSpec(file) |
| 15701 | 100 except MacOS.Error: |
|
10042
f2c072b05466
added some try/excepts so it also works when certain projects/folders are not available -- jvr
Just van Rossum <just@lettererror.com>
parents:
9990
diff
changeset
|
101 print '** file not found:', file |
|
f2c072b05466
added some try/excepts so it also works when certain projects/folders are not available -- jvr
Just van Rossum <just@lettererror.com>
parents:
9990
diff
changeset
|
102 continue |
|
6173
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
103 print 'Building', file, target |
|
10042
f2c072b05466
added some try/excepts so it also works when certain projects/folders are not available -- jvr
Just van Rossum <just@lettererror.com>
parents:
9990
diff
changeset
|
104 try: |
|
f2c072b05466
added some try/excepts so it also works when certain projects/folders are not available -- jvr
Just van Rossum <just@lettererror.com>
parents:
9990
diff
changeset
|
105 mgr.open(fss) |
|
f2c072b05466
added some try/excepts so it also works when certain projects/folders are not available -- jvr
Just van Rossum <just@lettererror.com>
parents:
9990
diff
changeset
|
106 except aetools.Error, detail: |
|
f2c072b05466
added some try/excepts so it also works when certain projects/folders are not available -- jvr
Just van Rossum <just@lettererror.com>
parents:
9990
diff
changeset
|
107 print '**', detail, file |
|
f2c072b05466
added some try/excepts so it also works when certain projects/folders are not available -- jvr
Just van Rossum <just@lettererror.com>
parents:
9990
diff
changeset
|
108 continue |
|
6173
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
109 if target: |
|
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
110 try: |
|
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
111 mgr.Set_Current_Target(target) |
|
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
112 except aetools.Error, arg: |
|
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
113 print '**', file, target, 'Cannot select:', arg |
|
3408
397e6d53a7ad
- AppleEvent timeout set to infinite
Jack Jansen <jack.jansen@cwi.nl>
parents:
3185
diff
changeset
|
114 try: |
|
397e6d53a7ad
- AppleEvent timeout set to infinite
Jack Jansen <jack.jansen@cwi.nl>
parents:
3185
diff
changeset
|
115 mgr.Make_Project() |
|
4324
1afcd1cd333b
Use auto-start functionality of aetools.TalkTo and aetools.Error for
Jack Jansen <jack.jansen@cwi.nl>
parents:
4167
diff
changeset
|
116 except aetools.Error, arg: |
|
6173
253e11b61106
Modified for CW Pro projects and new filenames
Jack Jansen <jack.jansen@cwi.nl>
parents:
5715
diff
changeset
|
117 print '**', file, target, 'Failed:', arg |
|
13699
026e12ac9f71
If any of the builds in a group fails offer to stop the fullbuild process and open the failing projects in codewarrior.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13397
diff
changeset
|
118 failed.append(fss) |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
119 mgr.Close_Project() |
|
13699
026e12ac9f71
If any of the builds in a group fails offer to stop the fullbuild process and open the failing projects in codewarrior.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13397
diff
changeset
|
120 if failed: |
|
026e12ac9f71
If any of the builds in a group fails offer to stop the fullbuild process and open the failing projects in codewarrior.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13397
diff
changeset
|
121 print 'Open failed projects and exit?', |
|
026e12ac9f71
If any of the builds in a group fails offer to stop the fullbuild process and open the failing projects in codewarrior.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13397
diff
changeset
|
122 rv = sys.stdin.readline() |
|
026e12ac9f71
If any of the builds in a group fails offer to stop the fullbuild process and open the failing projects in codewarrior.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13397
diff
changeset
|
123 if rv[0] in ('y', 'Y'): |
|
026e12ac9f71
If any of the builds in a group fails offer to stop the fullbuild process and open the failing projects in codewarrior.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13397
diff
changeset
|
124 for fss in failed: |
|
026e12ac9f71
If any of the builds in a group fails offer to stop the fullbuild process and open the failing projects in codewarrior.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13397
diff
changeset
|
125 mgr.open(fss) |
|
026e12ac9f71
If any of the builds in a group fails offer to stop the fullbuild process and open the failing projects in codewarrior.
Jack Jansen <jack.jansen@cwi.nl>
parents:
13397
diff
changeset
|
126 sys.exit(0) |
|
3502
61894ba571f5
Changed to allow the user to do partial builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
3462
diff
changeset
|
127 ## mgr.quit() |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
128 |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
129 def buildapplet(top, dummy, list): |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
130 """Create python applets""" |
|
16653
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
131 for src, dst, tmpl in list: |
|
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
132 template = buildtools.findtemplate(tmpl) |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
133 if src[-3:] != '.py': |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
134 raise 'Should end in .py', src |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
135 base = os.path.basename(src) |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
136 src = os.path.join(top, src) |
|
10052
794a21a5ad35
Added PythonIDE to the applet list; added destination filename support for applets -- jvr
Just van Rossum <just@lettererror.com>
parents:
10042
diff
changeset
|
137 dst = os.path.join(top, dst) |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
138 try: |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
139 os.unlink(dst) |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
140 except os.error: |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
141 pass |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
142 print 'Building applet', dst |
|
16653
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
143 try: |
|
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
144 buildtools.process(template, src, dst, 1) |
|
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
145 except buildtools.BuildError, arg: |
|
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
146 print '**', dst, arg |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
147 |
|
16087
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
148 def buildprojectfile(top, arg, list): |
| 15701 | 149 """Create CodeWarrior project files with a script""" |
| 150 for folder, module, routine in list: | |
| 151 print "Generating project files with", module | |
| 152 sys.path.insert(0, os.path.join(top, folder)) | |
| 153 m = __import__(module) | |
| 154 r = getattr(m, routine) | |
|
16087
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
155 r(arg) |
| 15701 | 156 del sys.path[0] |
| 157 | |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
158 def buildfat(top, dummy, list): |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
159 """Build fat binaries""" |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
160 for dst, src1, src2 in list: |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
161 dst = os.path.join(top, dst) |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
162 src1 = os.path.join(top, src1) |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
163 src2 = os.path.join(top, src2) |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
164 print 'Building fat binary', dst |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
165 cfmfile.mergecfmfiles((src1, src2), dst) |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
166 |
|
16565
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
167 def buildcopy(top, dummy, list): |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
168 import macostools |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
169 for src, dst in list: |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
170 src = os.path.join(top, src) |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
171 dst = os.path.join(top, dst) |
|
17004
b7b048da1673
macostools.copy() now has an optional forcetype flag, which sets the filetype. This is used by various tools to set the type to APPL when copying interpreter template files (Atmp filetype).
Jack Jansen <jack.jansen@cwi.nl>
parents:
16917
diff
changeset
|
172 macostools.copy(src, dst, forcetype="APPL") |
|
16565
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
173 |
|
24033
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
174 def buildsetup(top, dummy, list): |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
175 print 'Building extensions with setup.py ', ' '.join(list) |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
176 argv = ['setup.py'] + list[:] |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
177 save_argv = sys.argv |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
178 sys.argv = argv |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
179 sys.path.insert(0, top) |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
180 m = __import__('setup') |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
181 r = getattr(m, 'main') |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
182 r() |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
183 del sys.path[0] |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
184 sys.argv = save_argv |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
185 |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
186 def buildcarbonplugins(top, dummy1, dummy2): |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
187 ## XXXX Need to convert pathnames, I guess, and adapt distutils Mac-specific |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
188 ## code to not call GetArgv if not needed. |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
189 ## buildsetup(top, None, [ |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
190 ## '--dry_run', |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
191 ## 'install', |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
192 ## '--prefix=%s' % sys.prefix, |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
193 ## '--install-scripts=%s' % os.path.join(sys.prefix, 'Scripts'), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
194 ## '--install-platlib=%s' % os.path.join(sys.prefix, 'Lib', 'lib-dynload') |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
195 ## ]) |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
196 buildmwproject(top, "CWIE", [ |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
197 (":Mac:Build:_weakref.carbon.mcp", "_weakref.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
198 (":Mac:Build:_symtable.carbon.mcp", "_symtable.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
199 (":Mac:Build:_testcapi.carbon.mcp", "_testcapi.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
200 (":Mac:Build:_hotshot.carbon.mcp", "_hotshot.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
201 (":Mac:Build:xx.carbon.mcp", "xx.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
202 (":Mac:Build:xxsubtype.carbon.mcp", "xxsubtype.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
203 (":Mac:Build:pyexpat.carbon.mcp", "pyexpat.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
204 (":Mac:Build:calldll.carbon.mcp", "calldll.carbon"), |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
205 (":Mac:Build:datetime.carbon.mcp", "datetime.carbon"), |
|
24033
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
206 (":Mac:Build:gdbm.carbon.mcp", "gdbm.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
207 (":Mac:Build:icglue.carbon.mcp", "icglue.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
208 (":Mac:Build:waste.carbon.mcp", "waste.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
209 (":Mac:Build:zlib.carbon.mcp", "zlib.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
210 (":Mac:Build:hfsplus.carbon.mcp", "hfsplus.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
211 (":Mac:Build:ColorPicker.carbon.mcp", "ColorPicker.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
212 (":Mac:Build:_AE.carbon.mcp", "_AE.carbon"), |
|
25155
645dc33cd481
Silly me, I enabled the old help module. Fixed.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25154
diff
changeset
|
213 (":Mac:Build:_AH.carbon.mcp", "_AH.carbon"), |
|
24033
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
214 (":Mac:Build:_App.carbon.mcp", "_App.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
215 (":Mac:Build:_CF.carbon.mcp", "_CF.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
216 (":Mac:Build:_CG.carbon.mcp", "_CG.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
217 (":Mac:Build:_CarbonEvt.carbon.mcp", "_CarbonEvt.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
218 (":Mac:Build:_Cm.carbon.mcp", "_Cm.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
219 (":Mac:Build:_Ctl.carbon.mcp", "_Ctl.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
220 (":Mac:Build:_Dlg.carbon.mcp", "_Dlg.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
221 (":Mac:Build:_Drag.carbon.mcp", "_Drag.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
222 (":Mac:Build:_Evt.carbon.mcp", "_Evt.carbon"), |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
223 (":Mac:Build:_File.carbon.mcp", "_File.carbon"), |
|
24033
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
224 (":Mac:Build:_Fm.carbon.mcp", "_Fm.carbon"), |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
225 (":Mac:Build:_Folder.carbon.mcp", "_Folder.carbon"), |
|
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
226 (":Mac:Build:_Help.carbon.mcp", "_Help.carbon"), |
| 24563 | 227 (":Mac:Build:_IBCarbon.carbon.mcp", "_IBCarbon.carbon"), |
|
24033
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
228 (":Mac:Build:_Icn.carbon.mcp", "_Icn.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
229 (":Mac:Build:_List.carbon.mcp", "_List.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
230 (":Mac:Build:_Menu.carbon.mcp", "_Menu.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
231 (":Mac:Build:_Mlte.carbon.mcp", "_Mlte.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
232 (":Mac:Build:_Qd.carbon.mcp", "_Qd.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
233 (":Mac:Build:_Qdoffs.carbon.mcp", "_Qdoffs.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
234 (":Mac:Build:_Qt.carbon.mcp", "_Qt.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
235 (":Mac:Build:_Res.carbon.mcp", "_Res.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
236 (":Mac:Build:_Scrap.carbon.mcp", "_Scrap.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
237 (":Mac:Build:_Snd.carbon.mcp", "_Snd.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
238 (":Mac:Build:_Sndihooks.carbon.mcp", "_Sndihooks.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
239 (":Mac:Build:_TE.carbon.mcp", "_TE.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
240 (":Mac:Build:_Win.carbon.mcp", "_Win.carbon"), |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
241 ]) |
|
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
242 |
|
6296
c0d43d6f5240
Added a button to increment buildno, so it doesn't happen
Jack Jansen <jack.jansen@cwi.nl>
parents:
6211
diff
changeset
|
243 def handle_dialog(filename): |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
244 """Handle selection dialog, return list of selected items""" |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
245 d = Dlg.GetNewDialog(DIALOG_ID, -1) |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
246 d.SetDialogDefaultItem(I_OK) |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
247 d.SetDialogCancelItem(I_CANCEL) |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
248 results = [0]*N_BUTTONS |
|
24022
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
249 for n in BUTTONS_DISABLE: |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
250 ctl = d.GetDialogItemAsControl(n) |
|
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
21781
diff
changeset
|
251 ctl.HideControl() |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
252 while 1: |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
253 n = Dlg.ModalDialog(None) |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
254 if n == I_OK: |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
255 break |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
256 if n == I_CANCEL: |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
257 return [] |
|
6296
c0d43d6f5240
Added a button to increment buildno, so it doesn't happen
Jack Jansen <jack.jansen@cwi.nl>
parents:
6211
diff
changeset
|
258 if n == I_INC_BUILDNO: |
|
c0d43d6f5240
Added a button to increment buildno, so it doesn't happen
Jack Jansen <jack.jansen@cwi.nl>
parents:
6211
diff
changeset
|
259 incbuildno(filename) |
|
c0d43d6f5240
Added a button to increment buildno, so it doesn't happen
Jack Jansen <jack.jansen@cwi.nl>
parents:
6211
diff
changeset
|
260 continue |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
261 if n < len(results): |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
262 results[n] = (not results[n]) |
|
11635
778546dcba05
Modified for appearance.
Jack Jansen <jack.jansen@cwi.nl>
parents:
10358
diff
changeset
|
263 ctl = d.GetDialogItemAsControl(n) |
|
778546dcba05
Modified for appearance.
Jack Jansen <jack.jansen@cwi.nl>
parents:
10358
diff
changeset
|
264 ctl.SetControlValue(results[n]) |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
265 rv = [] |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
266 for i in range(len(results)): |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
267 if results[i]: |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
268 rv.append(i) |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
269 return rv |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
270 |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
271 # |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
272 # The build instructions. Entries are (routine, arg, list-of-files) |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
273 # XXXX We could also include the builds for stdwin and such here... |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
274 BUILD_DICT = { |
|
16087
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
275 I_GEN_PROJECTS : (buildprojectfile, 0, [ |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
276 (":Mac:scripts", "genpluginprojects", "genallprojects") |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
277 ]), |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
278 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
279 I_GEN_PROJECTS_FORCE : (buildprojectfile, 1, [ |
| 15701 | 280 (":Mac:scripts", "genpluginprojects", "genallprojects") |
| 281 ]), | |
| 282 | |
|
16087
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
283 I_GEN_IMGPROJECTS : (buildprojectfile, 0, [ |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
284 (":Extensions:img:Mac", "genimgprojects", "genallprojects") |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
285 ]), |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
286 |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
287 I_GEN_IMGPROJECTS_FORCE : (buildprojectfile, 1, [ |
| 15701 | 288 (":Extensions:img:Mac", "genimgprojects", "genallprojects") |
| 289 ]), | |
| 290 | |
|
16565
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
291 I_INTERPRETER : (buildcopy, None, [ |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
292 ("PythonInterpreterCarbon", "PythonInterpreter"), |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
293 ]), |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
294 |
|
16087
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
295 I_PPC_CORE : (buildmwproject, "CWIE", [ |
|
15471
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
296 (":Mac:Build:PythonCore.mcp", "PythonCore"), |
|
16565
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
297 (":Mac:Build:PythonInterpreter.mcp", "PythonInterpreterClassic"), |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
298 ]), |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
299 |
|
16087
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
300 I_CARBON_CORE : (buildmwproject, "CWIE", [ |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
301 (":Mac:Build:PythonCore.mcp", "PythonCoreCarbon"), |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
302 (":Mac:Build:PythonInterpreter.mcp", "PythonInterpreterCarbon"), |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
303 ]), |
|
263035bea3af
Added support for forced project building.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15701
diff
changeset
|
304 |
| 15701 | 305 I_PPC_EXTLIBS : (buildmwproject, "CWIE", [ |
| 306 ## (":Mac:Build:buildlibs.mcp", "buildlibs ppc plus tcl/tk"), | |
| 307 (":Mac:Build:buildlibs.mcp", "buildlibs ppc"), | |
| 308 ]), | |
| 309 | |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
310 I_PPC_PLUGINS : (buildmwproject, "CWIE", [ |
|
16565
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
311 (":Mac:Build:_weakref.mcp", "_weakref.ppc"), |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
312 (":Mac:Build:_symtable.mcp", "_symtable.ppc"), |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
313 (":Mac:Build:_testcapi.mcp", "_testcapi.ppc"), |
| 20640 | 314 (":Mac:Build:_hotshot.mcp", "_hotshot.ppc"), |
|
19570
9da68c0379ab
Added xx and xxsubtype modules, for completeness and because xxsubtype is used by the test suite.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19515
diff
changeset
|
315 (":Mac:Build:xx.mcp", "xx.ppc"), |
|
9da68c0379ab
Added xx and xxsubtype modules, for completeness and because xxsubtype is used by the test suite.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19515
diff
changeset
|
316 (":Mac:Build:xxsubtype.mcp", "xxsubtype.ppc"), |
|
15471
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
317 (":Mac:Build:pyexpat.mcp", "pyexpat.ppc"), |
|
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
318 (":Mac:Build:calldll.mcp", "calldll.ppc"), |
|
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
319 (":Mac:Build:ctb.mcp", "ctb.ppc"), |
|
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
320 (":Mac:Build:gdbm.mcp", "gdbm.ppc"), |
|
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
321 (":Mac:Build:icglue.mcp", "icglue.ppc"), |
|
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
322 (":Mac:Build:macspeech.mcp", "macspeech.ppc"), |
|
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
323 (":Mac:Build:waste.mcp", "waste.ppc"), |
|
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
324 (":Mac:Build:zlib.mcp", "zlib.ppc"), |
|
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
325 ## (":Mac:Build:_tkinter.mcp", "_tkinter.ppc"), |
|
15683
10612cbb4623
New .mcp names for tkinter and imgmodules projects.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15519
diff
changeset
|
326 (":Extensions:Imaging:_tkinter.mcp", "_tkinter.ppc"), |
|
15471
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
327 (":Mac:Build:ColorPicker.mcp", "ColorPicker.ppc"), |
|
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
328 (":Mac:Build:Printing.mcp", "Printing.ppc"), |
|
19441
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
329 (":Mac:Build:_AE.mcp", "_AE.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
330 (":Mac:Build:_App.mcp", "_App.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
331 (":Mac:Build:_Cm.mcp", "_Cm.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
332 (":Mac:Build:_Ctl.mcp", "_Ctl.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
333 (":Mac:Build:_Dlg.mcp", "_Dlg.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
334 (":Mac:Build:_Drag.mcp", "_Drag.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
335 (":Mac:Build:_Evt.mcp", "_Evt.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
336 (":Mac:Build:_Fm.mcp", "_Fm.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
337 (":Mac:Build:_Help.mcp", "_Help.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
338 (":Mac:Build:_Icn.mcp", "_Icn.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
339 (":Mac:Build:_List.mcp", "_List.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
340 (":Mac:Build:_Menu.mcp", "_Menu.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
341 (":Mac:Build:_Mlte.mcp", "_Mlte.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
342 (":Mac:Build:_Qd.mcp", "_Qd.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
343 (":Mac:Build:_Qdoffs.mcp", "_Qdoffs.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
344 (":Mac:Build:_Qt.mcp", "_Qt.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
345 (":Mac:Build:_Res.mcp", "_Res.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
346 (":Mac:Build:_Scrap.mcp", "_Scrap.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
347 (":Mac:Build:_Snd.mcp", "_Snd.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
348 (":Mac:Build:_Sndihooks.mcp", "_Sndihooks.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
349 (":Mac:Build:_TE.mcp", "_TE.ppc"), |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
350 (":Mac:Build:_Win.mcp", "_Win.ppc"), |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
351 ]), |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
352 |
|
24033
07e74993573c
Started on support for using standard setup.py to build at least
Jack Jansen <jack.jansen@cwi.nl>
parents:
24022
diff
changeset
|
353 I_CARBON_PLUGINS : (buildcarbonplugins, None, []), |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
354 |
|
16209
55e8c026e1e3
Build directives for PythonStandalone were missing.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16189
diff
changeset
|
355 I_PPC_FULL : (buildmwproject, "CWIE", [ |
|
55e8c026e1e3
Build directives for PythonStandalone were missing.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16189
diff
changeset
|
356 (":Mac:Build:PythonStandalone.mcp", "PythonStandalone"), |
|
55e8c026e1e3
Build directives for PythonStandalone were missing.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16189
diff
changeset
|
357 ]), |
|
55e8c026e1e3
Build directives for PythonStandalone were missing.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16189
diff
changeset
|
358 |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
359 I_PPC_SMALL : (buildmwproject, "CWIE", [ |
|
15471
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
360 (":Mac:Build:PythonStandSmall.mcp", "PythonStandSmall"), |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
361 ]), |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
362 |
|
16565
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
363 I_CARBON_FULL : (buildmwproject, "CWIE", [ |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
364 (":Mac:Build:PythonStandalone.mcp", "PythonCarbonStandalone"), |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
365 ]), |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
366 |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
367 I_CARBON_SMALL : (buildmwproject, "CWIE", [ |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
368 (":Mac:Build:PythonStandSmall.mcp", "PythonStandSmallCarbon"), |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
369 ]), |
|
23b5e7d03f76
Added buttons for building interpreter, carbon standalone.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16335
diff
changeset
|
370 |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
371 I_PPC_EXTENSIONS : (buildmwproject, "CWIE", [ |
|
15471
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
372 (":Extensions:Imaging:_imaging.mcp", "_imaging.ppc"), |
|
86cf6480d2fa
Updated for the new project names.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15212
diff
changeset
|
373 ## (":Extensions:Imaging:_tkinter.mcp", "_tkinter.ppc"), |
|
16189
991a17d61036
Also build the Carbon extension modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16182
diff
changeset
|
374 (":Extensions:img:Mac:imgmodules.mcp", "imgmodules.ppc"), |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
375 ]), |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
376 |
|
16189
991a17d61036
Also build the Carbon extension modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16182
diff
changeset
|
377 I_CARBON_EXTENSIONS : (buildmwproject, "CWIE", [ |
|
16917
bb25f2b7bdae
Also build Imaging for Carbon.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16653
diff
changeset
|
378 (":Extensions:Imaging:_imaging.mcp", "_imaging.carbon"), |
|
16189
991a17d61036
Also build the Carbon extension modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16182
diff
changeset
|
379 ## (":Extensions:Imaging:_tkinter.mcp", "_tkinter.carbon"), |
|
991a17d61036
Also build the Carbon extension modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16182
diff
changeset
|
380 (":Extensions:img:Mac:imgmodules.mcp", "imgmodules.carbon"), |
|
991a17d61036
Also build the Carbon extension modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16182
diff
changeset
|
381 ]), |
|
991a17d61036
Also build the Carbon extension modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16182
diff
changeset
|
382 |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
383 I_APPLETS : (buildapplet, None, [ |
|
16653
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
384 (":Mac:scripts:EditPythonPrefs.py", "EditPythonPrefs", None), |
|
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
385 (":Mac:scripts:BuildApplet.py", "BuildApplet", None), |
|
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
386 (":Mac:scripts:BuildApplication.py", "BuildApplication", None), |
|
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
387 (":Mac:scripts:ConfigurePython.py", "ConfigurePython", None), |
|
24975
7beb16923b71
Don't build ConfigurePythonCarbon and ConfigurePythonClassic any longer,
Jack Jansen <jack.jansen@cwi.nl>
parents:
24563
diff
changeset
|
388 ## (":Mac:scripts:ConfigurePython.py", "ConfigurePythonCarbon", "PythonInterpreterCarbon"), |
|
7beb16923b71
Don't build ConfigurePythonCarbon and ConfigurePythonClassic any longer,
Jack Jansen <jack.jansen@cwi.nl>
parents:
24563
diff
changeset
|
389 ## (":Mac:scripts:ConfigurePython.py", "ConfigurePythonClassic", "PythonInterpreterClassic"), |
|
16653
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
390 (":Mac:Tools:IDE:PythonIDE.py", "Python IDE", None), |
|
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
391 (":Mac:Tools:CGI:PythonCGISlave.py", ":Mac:Tools:CGI:PythonCGISlave", None), |
|
b9fe8bd9e5f4
ConfigurePython now comes in two flavors: ConfigurePythonClassic and ConfigurePythonCarbon, which copy the respective interpreters to PythonInterpreter and rebuild all the applets. This allows MacOS9 users to switch back and forth.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16565
diff
changeset
|
392 (":Mac:Tools:CGI:BuildCGIApplet.py", ":Mac:Tools:CGI:BuildCGIApplet", None), |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
393 ]), |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
394 } |
|
6211
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
395 |
|
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
396 def incbuildno(filename): |
|
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
397 fp = open(filename) |
|
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
398 line = fp.readline() |
|
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
399 fp.close() |
|
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
400 |
|
15696
57a4857430ff
Use re in stead of regex.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15683
diff
changeset
|
401 pat = re.compile('#define BUILD ([0-9]+)') |
|
57a4857430ff
Use re in stead of regex.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15683
diff
changeset
|
402 m = pat.search(line) |
|
57a4857430ff
Use re in stead of regex.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15683
diff
changeset
|
403 if not m or not m.group(1): |
|
6211
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
404 raise 'Incorrect macbuildno.h line', line |
|
15696
57a4857430ff
Use re in stead of regex.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15683
diff
changeset
|
405 buildno = m.group(1) |
|
6211
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
406 new = string.atoi(buildno) + 1 |
|
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
407 fp = open(filename, 'w') |
|
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
408 fp.write('#define BUILD %d\n'%new) |
|
a12ee27cad93
Fullbuild now maintains BUILDNO for mac builds
Jack Jansen <jack.jansen@cwi.nl>
parents:
6173
diff
changeset
|
409 fp.close() |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
410 |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
411 def main(): |
|
19515
546ef318ba5d
Use the new macresource module to open the accompanying resource file (if needed).
Jack Jansen <jack.jansen@cwi.nl>
parents:
19488
diff
changeset
|
412 macresource.need('DLOG', DIALOG_ID, 'fullbuild.rsrc') |
| 27406 | 413 dir = EasyDialogs.AskFolder(message='Python source folder:') |
| 414 if not dir: | |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
415 sys.exit(0) |
|
19321
42246b8c58bb
If genpluginprojects is called from fullbuild we set the Python source directory to be the same as fullbuild uses (in stead of using the default sys.prefix). This fixes an issue Mark Day raised that you can't use fullbuild with one Python installation to build another one.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19024
diff
changeset
|
416 # Set genpluginprojects to use this folder (slight hack) |
|
42246b8c58bb
If genpluginprojects is called from fullbuild we set the Python source directory to be the same as fullbuild uses (in stead of using the default sys.prefix). This fixes an issue Mark Day raised that you can't use fullbuild with one Python installation to build another one.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19024
diff
changeset
|
417 genpluginprojects.PYTHONDIR = dir |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
418 |
|
6296
c0d43d6f5240
Added a button to increment buildno, so it doesn't happen
Jack Jansen <jack.jansen@cwi.nl>
parents:
6211
diff
changeset
|
419 todo = handle_dialog(os.path.join(dir, MACBUILDNO)) |
|
c0d43d6f5240
Added a button to increment buildno, so it doesn't happen
Jack Jansen <jack.jansen@cwi.nl>
parents:
6211
diff
changeset
|
420 |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
421 instructions = [] |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
422 for i in todo: |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
423 instructions.append(BUILD_DICT[i]) |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
424 |
|
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
425 for routine, arg, list in instructions: |
|
5435
591c6420f11d
- toolboxmodules built first (others depend on it)
Jack Jansen <jack.jansen@cwi.nl>
parents:
5420
diff
changeset
|
426 routine(dir, arg, list) |
|
5420
014ea9d72d03
- Use cfmfile to (finally) implement building fat Pythons
Jack Jansen <jack.jansen@cwi.nl>
parents:
5144
diff
changeset
|
427 |
| 15701 | 428 if todo: |
| 429 print "All done!" | |
|
3063
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
430 |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
431 if __name__ == '__main__': |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
432 main() |
|
b333f16fb419
Build appplications, libraries and applets according to builtin
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
433 |
