Mercurial > cpython-lru_cache-weakref
comparison Mac/scripts/ConfigurePython.py @ 21286:1e7c0b849584 legacy-trunk
Not being able to copy PythonCore to the system-folder is not a fatal error, on OSX the user may not have permission to do so. Also give a more informative message in this case.
Fixes bug 475253.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Fri, 07 Dec 2001 16:07:04 +0000 |
| parents | 42b2f1936254 |
| children | eb6b36b26e8d |
comparison
equal
deleted
inserted
replaced
| 21285:50f28ed8044f | 21286:1e7c0b849584 |
|---|---|
| 69 try: | 69 try: |
| 70 os.unlink(dst) | 70 os.unlink(dst) |
| 71 except os.error: | 71 except os.error: |
| 72 pass | 72 pass |
| 73 do_copy = ask_copy() | 73 do_copy = ask_copy() |
| 74 if do_copy: | 74 try: |
| 75 macostools.copy(os.path.join(sys.exec_prefix, src), dst) | 75 if do_copy: |
| 76 else: | 76 macostools.copy(os.path.join(sys.exec_prefix, src), dst) |
| 77 macostools.mkalias(os.path.join(sys.exec_prefix, src), dst) | 77 else: |
| 78 macostools.mkalias(os.path.join(sys.exec_prefix, src), dst) | |
| 79 except IOError: | |
| 80 return 0 | |
| 78 return 1 | 81 return 1 |
| 79 | 82 |
| 80 do_copy = None | 83 do_copy = None |
| 81 def ask_copy(): | 84 def ask_copy(): |
| 82 global do_copy | 85 global do_copy |
| 164 if n == 0: | 167 if n == 0: |
| 165 from Carbon import Dlg | 168 from Carbon import Dlg |
| 166 Dlg.CautionAlert(ALERT_NOCORE, None) | 169 Dlg.CautionAlert(ALERT_NOCORE, None) |
| 167 if verbose: | 170 if verbose: |
| 168 print "Warning: PythonCore not copied to Extensions folder" | 171 print "Warning: PythonCore not copied to Extensions folder" |
| 172 print " (Applets will not work unless run from the Python folder)" | |
| 169 if sys.argv[0][-7:] == 'Classic': | 173 if sys.argv[0][-7:] == 'Classic': |
| 170 do_classic = 1 | 174 do_classic = 1 |
| 171 elif sys.argv[0][-6:] == 'Carbon': | 175 elif sys.argv[0][-6:] == 'Carbon': |
| 172 do_classic = 0 | 176 do_classic = 0 |
| 173 else: | 177 else: |
