This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE does not work on Mac OS X
Type: Stage:
Components: IDLE Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jackjansen, tonylownds
Priority: normal Keywords:

Created on 2003-02-17 21:47 by tonylownds, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
mac-osx-makefile.patch tonylownds, 2003-02-17 22:33 cvs diff -c Mac/OSX/Makefile
macosx_main.py tonylownds, 2003-02-17 22:34 File to be added to Tools/idle/
macosx_main.py tonylownds, 2003-02-19 17:59 File to be added to Tools/idle (its identical to Tools/idle/idle)
Messages (4)
msg14653 - (view) Author: Tony Lownds (tonylownds) Date: 2003-02-17 21:47
When building a framework build of python, the IDLE application that is made does not work anymore.

Here is the command that is causing trouble:

/Library/Frameworks/../../Library/Frameworks/Python.framework/Versions/2.3/Resources/Python.app/Contents/MacOS/python ../python/dist/src/Mac/scripts/BuildApplet.py --output /Library/Frameworks/../../Applications/MacPython-2.3/IDLE.app --extra ../python/dist/src/Tools/idle ../python/dist/src/Tools/idle/idle

or essentially:

python Mac/scripts/BuildApplet.py \
--output /Applications/MacPython-2.3/IDLE.app \
--extra Tools/idle Tools/idle/idle

The semantics of BuildApplet.py (well, buildtools.py) changed slightly, in a way that upset IDLE's build - it used to copy its argument (the main program file) into Resources/ under a new name - __main__.py. This changed so that the main program file keeps the same file name.

For IDLE, the main program is Tools/idle/idle but the Tools/idle directory needs to be copied into the bundle as well; before the slight semantic change in buildtools.py this worked OK but now two things named "idle" are getting copied to Resources/ and its not working.

Its hard to argue that BuildApplet really should support an --extra argument with the same basename as the main program file. Perhaps the best fix is to integrate the latest idlefork with Python 2.3 - this would eliminate this problem because the main file for mac applets is not called idle in idlefork.

Another way to fix this would be to extend BuildApplet and buildtools and bundlebuilder so that it is possible to specify a new name for the --extra argument, something like:

python Mac/scripts/BuildApplet.py --output IDLE.app --extra Tools/idle --rename-extra idlelib Tools/idle/idle


But the first fix option seems way more palateable.
msg14654 - (view) Author: Tony Lownds (tonylownds) Date: 2003-02-17 22:33
Logged In: YES 
user_id=24100

I think I have a found a good solution. Instead of using Tools/idle/idle as the main program argument to BuildApplet.py, the patch to Mac/OSX/Makefile below uses Tools/idle/macosx_main.py, which is attached separately.

The macosx_main.py file I provide is a copy of Tools/idle/idle with some code to work around another recent problem with running IDLE on Mac OS X. The new code removes some funny arguments that Mac OS X adds when GUI applications are launched. This same code can be found in Lib/plat-mac/argvemulator.py. I would have used argvemulator.py directly but I don't know if that would have other consequences. 

The patch to Mac/OSX/Makefile will be necessary when idlefork is integrated back into python. That is the reason for naming the new file macosx_main.py
msg14655 - (view) Author: Tony Lownds (tonylownds) Date: 2003-02-19 18:03
Logged In: YES 
user_id=24100

Updated macosx_main.py - since Jack added an argvemulation wrapper, macosx_main.py needs no special code and is the same as Tools/idle/idle
msg14656 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-02-25 12:48
Logged In: YES 
user_id=45365

Fixed in Mac/OSX/Makefile rev. 1.36. In a slightly different way than suggested, though: BuildApplet can now have different names for source and destination for files to include in the bundle, and this is used to copy ../Tools/idle to Contents/Resources/idlelib in the bundle. This makes the original main program (idle) work again.
History
Date User Action Args
2022-04-10 16:06:54adminsetgithub: 38003
2003-02-17 21:47:19tonylowndscreate