mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Hopefully fix make framework install on Mac (see 3174)
Removal of the Mac modules broke many of the Mac scripts (including BuildApplet.py) so the building of the Python launcher and IDLE.app was broken. I manually copied built versions of those apps into Mac. Everything else which used Mac modules had to die.
This commit is contained in:
parent
bbfd71d7ac
commit
de9c869fb8
75 changed files with 363 additions and 5710 deletions
30
Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py
Normal file
30
Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
"""
|
||||
Bootstrap script for IDLE as an application bundle.
|
||||
"""
|
||||
import sys, os
|
||||
|
||||
from idlelib.PyShell import main
|
||||
|
||||
# Change the current directory the user's home directory, that way we'll get
|
||||
# a more useful default location in the open/save dialogs.
|
||||
os.chdir(os.path.expanduser('~/Documents'))
|
||||
|
||||
|
||||
# Make sure sys.executable points to the python interpreter inside the
|
||||
# framework, instead of at the helper executable inside the application
|
||||
# bundle (the latter works, but doesn't allow access to the window server)
|
||||
if sys.executable.endswith('-32'):
|
||||
sys.executable = os.path.join(sys.prefix, 'bin', 'python-32')
|
||||
else:
|
||||
sys.executable = os.path.join(sys.prefix, 'bin', 'python')
|
||||
|
||||
# Look for the -psn argument that the launcher adds and remove it, it will
|
||||
# only confuse the IDLE startup code.
|
||||
for idx, value in enumerate(sys.argv):
|
||||
if value.startswith('-psn_'):
|
||||
del sys.argv[idx]
|
||||
break
|
||||
|
||||
#argvemulator.ArgvCollector().mainloop()
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue