mirror of https://github.com/python/cpython
Python.app is now a hidden application, deep in the framework. It will
be invoked by PythonLauncher when needed. Also changed the names of various variables in the Makefile to match what the main Makefile has.
This commit is contained in:
parent
2fc993d16f
commit
be3e1f7a95
|
@ -3,20 +3,20 @@
|
||||||
# commandline in that case.
|
# commandline in that case.
|
||||||
|
|
||||||
# assume user was invoking from Mac/OSX directory and building in source tree
|
# assume user was invoking from Mac/OSX directory and building in source tree
|
||||||
PYTHONBUILDDIR = ../..
|
builddir = ../..
|
||||||
PYTHONSRCDIR = ../..
|
srcdir = ../..
|
||||||
|
VERSION=2.3
|
||||||
|
|
||||||
INSTALLDIR=/Library/Frameworks/Python.framework/Versions/Current
|
prefix=/Library/Frameworks/Python.framework/Versions/$(VERSION)
|
||||||
PYTHONAPPSDIR=/Applications/Python
|
PYTHONAPPSDIR=/Applications/Python
|
||||||
APPINSTALLDIR=$(PYTHONAPPSDIR)/Python.app
|
APPINSTALLDIR=$(prefix)/Resources/Python.app
|
||||||
|
|
||||||
# Variables for installing the "normal" unix binaries
|
# Variables for installing the "normal" unix binaries
|
||||||
UNIXBINDIR=/usr/local/bin
|
UNIXBINDIR=/usr/local/bin
|
||||||
INSTALLED_PYTHON=$(INSTALLDIR)/bin/python
|
INSTALLED_PYTHON=$(prefix)/bin/python
|
||||||
INSTALLED_PYTHONW=$(APPINSTALLDIR)/Contents/MacOS/python
|
INSTALLED_PYTHONW=$(APPINSTALLDIR)/Contents/MacOS/python
|
||||||
|
|
||||||
# Items more-or-less copied from the main Makefile
|
# Items more-or-less copied from the main Makefile
|
||||||
VERSION=2.3
|
|
||||||
DIRMODE=755
|
DIRMODE=755
|
||||||
INSTALL=/usr/bin/install -c
|
INSTALL=/usr/bin/install -c
|
||||||
INSTALL_SYMLINK=/usr/bin/install -l as
|
INSTALL_SYMLINK=/usr/bin/install -l as
|
||||||
|
@ -26,32 +26,31 @@ INSTALL_DATA= ${INSTALL} -m 644
|
||||||
STRIPFLAG=-s
|
STRIPFLAG=-s
|
||||||
OPT=-g -O3 -Wall -Wstrict-prototypes -Wno-long-double -no-cpp-precomp \
|
OPT=-g -O3 -Wall -Wstrict-prototypes -Wno-long-double -no-cpp-precomp \
|
||||||
-fno-common -dynamic
|
-fno-common -dynamic
|
||||||
INCLUDES=-I$(PYTHONBUILDDIR) -I$(PYTHONSRCDIR)/Include \
|
INCLUDES=-I$(builddir) -I$(srcdir)/Include -I$(srcdir)/Mac/Include
|
||||||
-I$(PYTHONSRCDIR)/Mac/Include
|
|
||||||
DEFINES=-DHAVE_CONFIG_H
|
DEFINES=-DHAVE_CONFIG_H
|
||||||
|
|
||||||
CFLAGS=$(OPT) $(DEFINES) $(INCLUDES)
|
CFLAGS=$(OPT) $(DEFINES) $(INCLUDES)
|
||||||
LDFLAGS=-F$(PYTHONBUILDDIR) -framework System -framework Python -framework Carbon \
|
LDFLAGS=-F$(builddir) -framework System -framework Python -framework Carbon \
|
||||||
-framework Foundation
|
-framework Foundation
|
||||||
CC=cc
|
CC=cc
|
||||||
LD=cc
|
LD=cc
|
||||||
REZ=/Developer/Tools/Rez
|
REZ=/Developer/Tools/Rez
|
||||||
DEREZ=/Developer/Tools/DeRez
|
DEREZ=/Developer/Tools/DeRez
|
||||||
|
|
||||||
OBJECTS=$(PYTHONBUILDDIR)/Mac/Python/macmain.o \
|
OBJECTS=$(builddir)/Mac/Python/macmain.o \
|
||||||
$(PYTHONBUILDDIR)/Mac/Python/macgetargv.o
|
$(builddir)/Mac/Python/macgetargv.o
|
||||||
|
|
||||||
PYTHON=$(PYTHONBUILDDIR)/python.exe
|
PYTHON=$(builddir)/python.exe
|
||||||
APPTEMPLATE=$(PYTHONSRCDIR)/Mac/OSXResources/app
|
APPTEMPLATE=$(srcdir)/Mac/OSXResources/app
|
||||||
APPSUBDIRS=MacOS Resources Resources/English.lproj
|
APPSUBDIRS=MacOS Resources Resources/English.lproj
|
||||||
RESOURCEDIR=$(PYTHONSRCDIR)/Mac/Resources
|
RESOURCEDIR=$(srcdir)/Mac/Resources
|
||||||
RESOURCEFILE=python.rsrc
|
RESOURCEFILE=python.rsrc
|
||||||
RFCONVERTER=$(PYTHONSRCDIR)/Mac/Lib/applesingle.py
|
RFCONVERTER=$(srcdir)/Mac/Lib/applesingle.py
|
||||||
|
|
||||||
install_all: install_PythonLauncher install_Python install_IDE
|
install_all: install_PythonLauncher install_Python install_IDE
|
||||||
|
|
||||||
install_PythonLauncher:
|
install_PythonLauncher:
|
||||||
cd $(PYTHONSRCDIR)/Mac/OSX/PythonLauncher/PythonLauncher.pbproj ; \
|
cd $(srcdir)/Mac/OSX/PythonLauncher/PythonLauncher.pbproj ; \
|
||||||
pbxbuild -target PythonLauncher -buildstyle Deployment DSTROOT=/ install
|
pbxbuild -target PythonLauncher -buildstyle Deployment DSTROOT=/ install
|
||||||
|
|
||||||
install_Python: pythonforbundle
|
install_Python: pythonforbundle
|
||||||
|
@ -102,12 +101,12 @@ install_Python: pythonforbundle
|
||||||
$(INSTALL_DATA) $(RESOURCEFILE) $(APPINSTALLDIR)/Contents/Resources/$(RESOURCEFILE)
|
$(INSTALL_DATA) $(RESOURCEFILE) $(APPINSTALLDIR)/Contents/Resources/$(RESOURCEFILE)
|
||||||
|
|
||||||
install_IDE: $(INSTALLED_PYTHONW)
|
install_IDE: $(INSTALLED_PYTHONW)
|
||||||
$(INSTALLED_PYTHONW) $(PYTHONSRCDIR)/Mac/scripts/BuildApplet.py \
|
$(INSTALLED_PYTHONW) $(srcdir)/Mac/scripts/BuildApplet.py \
|
||||||
--output $(PYTHONAPPSDIR)/PythonIDE.app --noargv \
|
--output $(PYTHONAPPSDIR)/PythonIDE.app --noargv \
|
||||||
$(PYTHONSRCDIR)/Mac/Tools/IDE/PythonIDE.py
|
$(srcdir)/Mac/Tools/IDE/PythonIDE.py
|
||||||
|
|
||||||
LIBDEST=$(INSTALLDIR)/Mac/Lib
|
LIBDEST=$(prefix)/Mac/Lib
|
||||||
LIBSRC=$(PYTHONSRCDIR)/Mac/Lib
|
LIBSRC=$(srcdir)/Mac/Lib
|
||||||
LIBSUBDIRS= \
|
LIBSUBDIRS= \
|
||||||
Carbon \
|
Carbon \
|
||||||
lib-scriptpackages \
|
lib-scriptpackages \
|
||||||
|
@ -122,8 +121,8 @@ LIBSUBDIRS= \
|
||||||
mkcwproject/template \
|
mkcwproject/template \
|
||||||
mkcwproject/template-carbon \
|
mkcwproject/template-carbon \
|
||||||
mkcwproject/template-ppc
|
mkcwproject/template-ppc
|
||||||
TOOLSDEST=$(INSTALLDIR)/Mac/Tools
|
TOOLSDEST=$(prefix)/Mac/Tools
|
||||||
TOOLSSRC=$(PYTHONSRCDIR)/Mac/Tools
|
TOOLSSRC=$(srcdir)/Mac/Tools
|
||||||
TOOLSSUBDIRS=IDE
|
TOOLSSUBDIRS=IDE
|
||||||
installmacsubtree:
|
installmacsubtree:
|
||||||
@for i in $(LIBDEST) $(TOOLSDEST); \
|
@for i in $(LIBDEST) $(TOOLSDEST); \
|
||||||
|
@ -215,7 +214,7 @@ installmacsubtree:
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
|
|
||||||
$(INSTALL_DATA) $(PYTHONSRCDIR)/Mac/OSX/Mac.pth $(INSTALLDIR)/lib/python$(VERSION)/site-packages/
|
$(INSTALL_DATA) $(srcdir)/Mac/OSX/Mac.pth $(prefix)/lib/python$(VERSION)/site-packages/
|
||||||
|
|
||||||
# Put symlinks "python" and "pythonw" in the standard place
|
# Put symlinks "python" and "pythonw" in the standard place
|
||||||
$(INSTALLED_PYTHONW): install_Python
|
$(INSTALLED_PYTHONW): install_Python
|
||||||
|
@ -229,17 +228,17 @@ installunixprograms: $(INSTALLED_PYTHON) $(INSTALLED_PYTHONW) pythonw.sh
|
||||||
# This is for development purposes: create a Mac.pth that refers to the source
|
# This is for development purposes: create a Mac.pth that refers to the source
|
||||||
# directories
|
# directories
|
||||||
dontinstallmacsubtree:
|
dontinstallmacsubtree:
|
||||||
l=`cd $(PYTHONSRCDIR)/Mac/Lib; pwd`; \
|
l=`cd $(srcdir)/Mac/Lib; pwd`; \
|
||||||
echo $$l > $(INSTALLDIR)/lib/python$(VERSION)/site-packages/Mac.pth ; \
|
echo $$l > $(prefix)/lib/python$(VERSION)/site-packages/Mac.pth ; \
|
||||||
echo $$l/lib-scriptpackages >> $(INSTALLDIR)/lib/python$(VERSION)/site-packages/Mac.pth
|
echo $$l/lib-scriptpackages >> $(prefix)/lib/python$(VERSION)/site-packages/Mac.pth
|
||||||
|
|
||||||
pythonforbundle: $(OBJECTS)
|
pythonforbundle: $(OBJECTS)
|
||||||
$(LD) $(LDFLAGS) $(OBJECTS) -o pythonforbundle
|
$(LD) $(LDFLAGS) $(OBJECTS) -o pythonforbundle
|
||||||
|
|
||||||
# Rules to build each file in OBJECTS - is there a better way?
|
# Rules to build each file in OBJECTS - is there a better way?
|
||||||
$(PYTHONBUILDDIR)/Mac/Python/macmain.o: $(PYTHONSRCDIR)/Mac/Python/macmain.c
|
$(builddir)/Mac/Python/macmain.o: $(srcdir)/Mac/Python/macmain.c
|
||||||
$(CC) $(CFLAGS) -c $(PYTHONSRCDIR)/Mac/Python/macmain.c -o $@
|
$(CC) $(CFLAGS) -c $(srcdir)/Mac/Python/macmain.c -o $@
|
||||||
|
|
||||||
$(PYTHONBUILDDIR)/Mac/Python/macgetargv.o: $(PYTHONSRCDIR)/Mac/Python/macgetargv.c
|
$(builddir)/Mac/Python/macgetargv.o: $(srcdir)/Mac/Python/macgetargv.c
|
||||||
$(CC) $(CFLAGS) -c $(PYTHONSRCDIR)/Mac/Python/macgetargv.c -o $@
|
$(CC) $(CFLAGS) -c $(srcdir)/Mac/Python/macgetargv.c -o $@
|
||||||
|
|
||||||
|
|
|
@ -59,10 +59,10 @@
|
||||||
others = @"";
|
others = @"";
|
||||||
if ([filetype isEqualToString: @"Python Script"] ||
|
if ([filetype isEqualToString: @"Python Script"] ||
|
||||||
[filetype isEqualToString: @"Python Bytecode Document"]) {
|
[filetype isEqualToString: @"Python Bytecode Document"]) {
|
||||||
interpreter = @"/usr/local/bin/python";
|
interpreter = @"/Library/Frameworks/Python.framework/Versions/Current/bin/python";
|
||||||
with_terminal = YES;
|
with_terminal = YES;
|
||||||
} else if ([filetype isEqualToString: @"Python GUI Script"]) {
|
} else if ([filetype isEqualToString: @"Python GUI Script"]) {
|
||||||
interpreter = @"/Applications/Python.app/Contents/MacOS/python";
|
interpreter = @"/Library/Frameworks/Python.framework/Versions/Current/Resources/Python.app/Contents/MacOS/python";
|
||||||
with_terminal = NO;
|
with_terminal = NO;
|
||||||
} else {
|
} else {
|
||||||
NSLog(@"Funny File Type: %@\n", filetype);
|
NSLog(@"Funny File Type: %@\n", filetype);
|
||||||
|
|
Loading…
Reference in New Issue