Mercurial > cpython-lru_cache-weakref
comparison Mac/scripts/ConfigurePython.py @ 16597:07ffb0c3bd5e legacy-trunk
Also create alias to PythonCoreCarbon.
Got rid of lots of 68k stuff.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Wed, 14 Feb 2001 17:04:51 +0000 |
| parents | d2c205c36d8a |
| children | b9fe8bd9e5f4 |
comparison
equal
deleted
inserted
replaced
| 16596:085511916776 | 16597:07ffb0c3bd5e |
|---|---|
| 21 ALERT_NONBOOT=517 | 21 ALERT_NONBOOT=517 |
| 22 ALERT_NONBOOT_COPY=1 | 22 ALERT_NONBOOT_COPY=1 |
| 23 ALERT_NONBOOT_ALIAS=2 | 23 ALERT_NONBOOT_ALIAS=2 |
| 24 | 24 |
| 25 ppc_goals = [ | 25 ppc_goals = [ |
| 26 ## ("AE.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 27 ## ("Ctl.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 28 ## ("Dlg.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 29 ## ("Evt.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 30 ## ("Fm.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 31 ## ("Help.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 32 ## ("Icn.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 33 ## ("Menu.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 34 ## ("List.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 35 ## ("Qd.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 36 ## ("Res.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 37 ## ("Scrap.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 38 ## ("Snd.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 39 ## ("Sndihooks.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 40 ## ("TE.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 41 ## ("Win.ppc.slb", "toolboxmodules.ppc.slb"), | |
| 42 ## | |
| 43 ## ("Cm.ppc.slb", "qtmodules.ppc.slb"), | |
| 44 ## ("Qt.ppc.slb", "qtmodules.ppc.slb"), | |
| 45 | |
| 46 ] | |
| 47 | |
| 48 cfm68k_goals = [ | |
| 49 ## ("AE.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 50 ## ("Ctl.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 51 ## ("Dlg.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 52 ## ("Evt.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 53 ## ("Fm.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 54 ## ("Help.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 55 ## ("Icn.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 56 ## ("Menu.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 57 ## ("List.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 58 ## ("Qd.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 59 ## ("Res.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 60 ## ("Scrap.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 61 ## ("Snd.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 62 ## ("Sndihooks.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 63 ## ("TE.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 64 ## ("Win.CFM68K.slb", "toolboxmodules.CFM68K.slb"), | |
| 65 ## | |
| 66 ## ("Cm.CFM68K.slb", "qtmodules.CFM68K.slb"), | |
| 67 ## ("Qt.CFM68K.slb", "qtmodules.CFM68K.slb"), | |
| 68 ] | 26 ] |
| 69 | 27 |
| 70 def gotopluginfolder(): | 28 def gotopluginfolder(): |
| 71 """Go to the plugin folder, assuming we are somewhere in the Python tree""" | 29 """Go to the plugin folder, assuming we are somewhere in the Python tree""" |
| 72 import os | 30 import os |
| 85 pass | 43 pass |
| 86 else: | 44 else: |
| 87 if verbose: print 'imported Res the standard way.' | 45 if verbose: print 'imported Res the standard way.' |
| 88 return | 46 return |
| 89 | 47 |
| 90 # We cannot import it. First attempt to load the cfm68k version | 48 # We cannot import it. Try a manual load |
| 91 import imp | |
| 92 try: | |
| 93 dummy = imp.load_dynamic('Res', 'toolboxmodules.CFM68K.slb') | |
| 94 except ImportError, arg: | |
| 95 err2 = arg | |
| 96 pass | |
| 97 else: | |
| 98 if verbose: print 'Loaded Res from toolboxmodules.CFM68K.slb.' | |
| 99 return | |
| 100 | |
| 101 # Ok, try the ppc version | |
| 102 try: | 49 try: |
| 103 dummy = imp.load_dynamic('Res', 'toolboxmodules.ppc.slb') | 50 dummy = imp.load_dynamic('Res', 'toolboxmodules.ppc.slb') |
| 104 except ImportError, arg: | 51 except ImportError, arg: |
| 105 err3 = arg | 52 err3 = arg |
| 106 pass | 53 pass |
| 110 | 57 |
| 111 # Tough luck.... | 58 # Tough luck.... |
| 112 print "I cannot import the Res module, nor load it from either of" | 59 print "I cannot import the Res module, nor load it from either of" |
| 113 print "toolboxmodules shared libraries. The errors encountered were:" | 60 print "toolboxmodules shared libraries. The errors encountered were:" |
| 114 print "import Res:", err1 | 61 print "import Res:", err1 |
| 115 print "load from toolboxmodules.CFM68K.slb:", err2 | |
| 116 print "load from toolboxmodules.ppc.slb:", err3 | 62 print "load from toolboxmodules.ppc.slb:", err3 |
| 117 sys.exit(1) | 63 sys.exit(1) |
| 118 | 64 |
| 119 def getextensiondirfile(fname): | 65 def getextensiondirfile(fname): |
| 120 import macfs | 66 import macfs |
| 193 macostools.mkalias(src, dst) | 139 macostools.mkalias(src, dst) |
| 194 if verbose: print ' ', dst, '->', src | 140 if verbose: print ' ', dst, '->', src |
| 195 else: | 141 else: |
| 196 if verbose: print '*', dst, 'not created:', src, 'not found' | 142 if verbose: print '*', dst, 'not created:', src, 'not found' |
| 197 if verbose: print | 143 if verbose: print |
| 198 | 144 |
| 199 # Create the CFM68K aliases. | |
| 200 didsplash = 0 | |
| 201 if verbose: print 'Creating CFM68K aliases...' | |
| 202 for dst, src in cfm68k_goals: | |
| 203 if src in LibFiles: | |
| 204 if not didsplash: | |
| 205 MacOS.splash(SPLASH_CFM68K) | |
| 206 didsplash = 1 | |
| 207 macostools.mkalias(src, dst) | |
| 208 if verbose: print ' ', dst, '->', src | |
| 209 else: | |
| 210 if verbose: print '*', dst, 'not created:', src, 'not found' | |
| 211 if verbose: print | |
| 212 | |
| 213 # Create the PythonCore alias(es) | 145 # Create the PythonCore alias(es) |
| 214 if verbose: print 'Creating PythonCore aliases in Extensions folder...' | 146 if verbose: print 'Creating PythonCore aliases in Extensions folder...' |
| 215 os.chdir('::') | 147 os.chdir('::') |
| 216 n = 0 | 148 n = 0 |
| 217 n = n + mkcorealias('PythonCore', 'PythonCore') | 149 n = n + mkcorealias('PythonCore', 'PythonCore') |
| 218 n = n + mkcorealias('PythonCorePPC', ':build.macppc.shared:PythonCorePPC') | 150 n = n + mkcorealias('PythonCoreCarbon', 'PythonCoreCarbon') |
| 219 n = n + mkcorealias('PythonCoreCFM68K', ':build.mac68k.shared:PythonCoreCFM68K') | |
| 220 | 151 |
| 221 if verbose and n == 0: | 152 if verbose and n == 0: |
| 222 sys.exit(1) | 153 sys.exit(1) |
| 223 | 154 |
| 224 if __name__ == '__main__': | 155 if __name__ == '__main__': |
