summaryrefslogtreecommitdiffstats
path: root/Mac/OSX
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/OSX')
-rw-r--r--Mac/OSX/Makefile18
-rw-r--r--Mac/OSX/README49
2 files changed, 24 insertions, 43 deletions
diff --git a/Mac/OSX/Makefile b/Mac/OSX/Makefile
index daf9dfe..f505bc5 100644
--- a/Mac/OSX/Makefile
+++ b/Mac/OSX/Makefile
@@ -37,9 +37,6 @@ LD=cc
REZ=/Developer/Tools/Rez
DEREZ=/Developer/Tools/DeRez
-OBJECTS=$(builddir)/Mac/Python/macmain.o \
- $(builddir)/Mac/Python/macgetargv.o
-
PYTHON=$(builddir)/python.exe
APPTEMPLATE=$(srcdir)/Mac/OSXResources/app
APPSUBDIRS=MacOS Resources Resources/English.lproj
@@ -53,7 +50,7 @@ install_PythonLauncher:
cd $(srcdir)/Mac/OSX/PythonLauncher/PythonLauncher.pbproj ; \
pbxbuild -target PythonLauncher -buildstyle Deployment DSTROOT=/ install
-install_Python: pythonforbundle
+install_Python: $(PYTHON)
@for i in $(PYTHONAPPSDIR) $(APPINSTALLDIR) $(APPINSTALLDIR)/Contents; do \
if test ! -d $$i; then \
echo "Creating directory $$i"; \
@@ -91,7 +88,7 @@ install_Python: pythonforbundle
esac; \
done; \
done
- $(INSTALL_PROGRAM) $(STRIPFLAG) pythonforbundle $(APPINSTALLDIR)/Contents/MacOS/python
+ $(INSTALL_PROGRAM) $(STRIPFLAG) $(PYTHON) $(APPINSTALLDIR)/Contents/MacOS/python
# Create a temporary version of the resources here
$(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/dialogs.rsrc dialogs.rsrc
$(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/errors.rsrc errors.rsrc
@@ -231,14 +228,3 @@ dontinstallmacsubtree:
l=`cd $(srcdir)/Mac/Lib; pwd`; \
echo $$l > $(prefix)/lib/python$(VERSION)/site-packages/Mac.pth ; \
echo $$l/lib-scriptpackages >> $(prefix)/lib/python$(VERSION)/site-packages/Mac.pth
-
-pythonforbundle: $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o pythonforbundle
-
-# Rules to build each file in OBJECTS - is there a better way?
-$(builddir)/Mac/Python/macmain.o: $(srcdir)/Mac/Python/macmain.c
- $(CC) $(CFLAGS) -c $(srcdir)/Mac/Python/macmain.c -o $@
-
-$(builddir)/Mac/Python/macgetargv.o: $(srcdir)/Mac/Python/macgetargv.c
- $(CC) $(CFLAGS) -c $(srcdir)/Mac/Python/macgetargv.c -o $@
-
diff --git a/Mac/OSX/README b/Mac/OSX/README
index 4c8dc0a..822a9d9 100644
--- a/Mac/OSX/README
+++ b/Mac/OSX/README
@@ -1,34 +1,29 @@
-This directory contains a Makefile that will create a proof-of-concept
-Mac OS X application for Python. The process is far from streamlined,
-and it will definitely change in future releases of Python, but I wanted to
-include this in the current distribution so people could play with it.
+This directory contains a Makefile that will create a couple of python-related
+applications (fullblown OSX .app applications, that is) in /Applications/Python,
+and a hidden helper application Python.app inside the Python.framework. In addition
+it has a target "installmacsubtree" that installs the relevant portions of the
+Mac subtree into the Python.framework.
-To create a fullblown Python.app proceed as follows.
+It is normally invoked indirectly through the main Makefile, as the last step
+in the sequence
+1. configure --enable-framework
+2. make
+3. make frameworkinstall
+4. make osxapps
-1. In the main Python source directory configure python with
- configure --enable-framework
-2. Do a "make clean" if you did a previous build, then "make".
-3. Install this as a framework with "make frameworkinstall". This puts a Python
- framework into /Library/Frameworks.
-4. Come back here (Mac/OSX) and build and install the application,
- with "make install".
-5. It is probably a good idea to add the Mac-specific modules to the framework,
- with "make installmacsubtree". This puts a MacPython lib directory into
- sys.prefix/Mac/Lib. Again, this is a temporary measure.
-6. To actually find the Lib directory installed in step 5 you add a line
- to your site.py file (the one in /Library/Frameworks/....):
- sys.path.append(os.path.join(sys.prefix, 'Mac/Lib'))
+The interesting targets in the makefile are:
+installmacsubtree - explained above,
+dontinstallmacsubtree - Put only a .pth file into the framework (pointing to this
+ sourcetree), which may be easier for development,
+install_all - install all three .app applications,
+install_Python - install the hidden interpreter .app into the framework,
+install_PythonLauncher - install the user-visible script launch helper
+install_IDE - install the IDE
+installunixprograms - install symlinks/scripts mimicking normal unix Python into
+ /usr/local.
-You are now done. In your Applications you should have a "Python", with the icon
-being a falling 16 Ton weight with a shadow under it. You can drop Python scripts
-on this and the will be run, in a full-windowing environment. Note that you
-do not get sys.stdin, and that sys.stdout goes to the console (Use
-Applications/Utilities/Console to see it).
-
-For some reason the application only accepts files with TEXT type, not straight unix
-typeless files.
Something to take note of is that the ".rsrc" files in the distribution are not
actually resource files, they're AppleSingle encoded resource files.
- Jack Jansen, jack@oratrix.com, 11-Sep-01. \ No newline at end of file
+ Jack Jansen, jack@oratrix.com, 02-Aug-02 \ No newline at end of file