Make it possible to install a framework build of Python 3.x on OSX. · python/cpython@2160015 · GitHub
Skip to content

Commit 2160015

Browse files
Make it possible to install a framework build of Python 3.x on OSX.
This the build machinery on OSX to re-enable building (and installing) PythonLauncher.app and IDLE.app. This needs ports of fixes to Lib/distutils/util.py and Include/pymacconfig.h to be fully functiontional, to be fully functional. I also have a patch for Makefile.pre.in that I'll post on bugs.python.org for review.
1 parent a17775f commit 2160015

8 files changed

Lines changed: 1007 additions & 19 deletions

File tree

Lines changed: 9 additions & 8 deletions

Mac/IDLE/IDLE.app/Contents/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<key>CFBundleExecutable</key>
3737
<string>IDLE</string>
3838
<key>CFBundleGetInfoString</key>
39-
<string>2.6.0, © 001-2006 Python Software Foundation</string>
39+
<string>%version%, © 2001-2008 Python Software Foundation</string>
4040
<key>CFBundleIconFile</key>
4141
<string>IDLE.icns</string>
4242
<key>CFBundleIdentifier</key>
@@ -48,10 +48,10 @@
4848
<key>CFBundlePackageType</key>
4949
<string>APPL</string>
5050
<key>CFBundleShortVersionString</key>
51-
<string>2.6.0</string>
51+
<string>%version%</string>
5252
<key>CFBundleSignature</key>
5353
<string>????</string>
5454
<key>CFBundleVersion</key>
55-
<string>2.6.0</string>
55+
<string>%version%</string>
5656
</dict>
5757
</plist>

Mac/IDLE/IDLE.app/Contents/MacOS/IDLE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/Library/Frameworks/Python.framework/Versions/3.0/Resources/Python.app/Contents/MacOS/Python
1+
#!%prefix%/Resources/Python.app/Contents/MacOS/Python3
22

33
import sys, os
44
execdir = os.path.dirname(sys.argv[0])

Mac/Makefile.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,10 @@ install_Python4way: install_Python
216216
install_IDLE:
217217
test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)"
218218
-test -d "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app"
219-
cp -PR IDLE/IDLE.app "$(DESTDIR)$(PYTHONAPPSDIR)"
219+
cp -PR "$(srcdir)/IDLE/IDLE.app" "$(DESTDIR)$(PYTHONAPPSDIR)"
220220
ln -sf $(INSTALLED_PYTHONAPP) "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/Python"
221+
sed "s!%prefix%!$(prefix)!g" < "$(srcdir)/IDLE/IDLE.app/Contents/MacOS/IDLE" > "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app/Contents/MacOS/IDLE"
222+
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"
221223
touch "$(DESTDIR)$(PYTHONAPPSDIR)/IDLE.app"
222224

223225
$(INSTALLED_PYTHONAPP): install_Python

Mac/PythonLauncher/Info.plist.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<key>CFBundleExecutable</key>
4141
<string>PythonLauncher</string>
4242
<key>CFBundleGetInfoString</key>
43-
<string>%VERSION%, © 001-2006 Python Software Foundation</string>
43+
<string>%VERSION%, © 2001-2008 Python Software Foundation</string>
4444
<key>CFBundleIconFile</key>
4545
<string>PythonLauncher.icns</string>
4646
<key>CFBundleIdentifier</key>

Mac/PythonLauncher/Makefile.in

Lines changed: 52 additions & 2 deletions

0 commit comments

Comments
 (0)