Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b9dcfea

Browse files
committed
Issue Issue #15663: merge from 3.3
2 parents 624a74e + 246eb11 commit b9dcfea

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# the interpreter in the framework, by following the symlink
4949
# exported in PYTHONEXECUTABLE.
5050
pyex = os.environ['PYTHONEXECUTABLE']
51-
sys.executable = os.path.join(os.path.dirname(pyex), os.readlink(pyex))
51+
sys.executable = os.path.join(sys.prefix, 'bin', 'python%d.%d'%(sys.version_info[:2]))
5252

5353
# Remove any sys.path entries for the Resources dir in the IDLE.app bundle.
5454
p = pyex.partition('.app')
@@ -68,6 +68,8 @@
6868
break
6969

7070
# Now it is safe to import idlelib.
71+
from idlelib import macosxSupport
72+
macosxSupport._appbundle = True
7173
from idlelib.PyShell import main
7274
if __name__ == '__main__':
7375
main()

Mac/Makefile.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ install_IDLE:
166166
-test -d "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" && rm -rf "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app"
167167
/bin/cp -PR "$(srcdir)/IDLE/IDLE.app" "$(DESTDIR)$(PYTHONAPPSDIR)"
168168
ln -sf "$(INSTALLED_PYTHONAPP)" "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python"
169+
ifneq ($(LIPO_32BIT_FLAGS),)
170+
rm "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python"
171+
lipo $(LIPO_32BIT_FLAGS) -output "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python" "$(BUILDPYTHON)"
172+
endif
169173
sed -e "s!%prefix%!$(prefix)!g" -e 's!%exe%!$(PYTHONFRAMEWORK)!g' < "$(srcdir)/IDLE/IDLE.app/Contents/MacOS/IDLE" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/IDLE"
170174
sed "s!%version%!`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`!g" < "$(srcdir)/IDLE/IDLE.app/Contents/Info.plist" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/Info.plist"
171175
if [ -f "$(DESTDIR)$(LIBDEST)/idlelib/config-main.def" ]; then \

0 commit comments

Comments
 (0)