Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE does not work on Mac OS X #38003

Closed
tonylownds mannequin opened this issue Feb 17, 2003 · 4 comments
Closed

IDLE does not work on Mac OS X #38003

tonylownds mannequin opened this issue Feb 17, 2003 · 4 comments

Comments

@tonylownds
Copy link
Mannequin

tonylownds mannequin commented Feb 17, 2003

BPO 688266
Nosy @jackjansen
Files
  • mac-osx-makefile.patch: cvs diff -c Mac/OSX/Makefile
  • macosx_main.py: File to be added to Tools/idle/
  • macosx_main.py: File to be added to Tools/idle (its identical to Tools/idle/idle)
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2003-02-25.12:48:11.000>
    created_at = <Date 2003-02-17.21:47:19.000>
    labels = ['expert-IDLE']
    title = 'IDLE does not work on Mac OS X'
    updated_at = <Date 2003-02-25.12:48:11.000>
    user = 'https://bugs.python.org/tonylownds'

    bugs.python.org fields:

    activity = <Date 2003-02-25.12:48:11.000>
    actor = 'jackjansen'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2003-02-17.21:47:19.000>
    creator = 'tonylownds'
    dependencies = []
    files = ['790', '791', '792']
    hgrepos = []
    issue_num = 688266
    keywords = []
    message_count = 4.0
    messages = ['14653', '14654', '14655', '14656']
    nosy_count = 2.0
    nosy_names = ['jackjansen', 'tonylownds']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue688266'
    versions = []

    @tonylownds
    Copy link
    Mannequin Author

    tonylownds mannequin commented Feb 17, 2003

    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.

    @tonylownds tonylownds mannequin closed this as completed Feb 17, 2003
    @tonylownds tonylownds mannequin added the topic-IDLE label Feb 17, 2003
    @tonylownds tonylownds mannequin closed this as completed Feb 17, 2003
    @tonylownds tonylownds mannequin added the topic-IDLE label Feb 17, 2003
    @tonylownds
    Copy link
    Mannequin Author

    tonylownds mannequin commented Feb 17, 2003

    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

    @tonylownds
    Copy link
    Mannequin Author

    tonylownds mannequin commented Feb 19, 2003

    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

    @jackjansen
    Copy link
    Member

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant