Jack Jansen | 0511b76 | 2001-09-06 16:36:42 +0000 | [diff] [blame] | 1 | This directory contains a Makefile that will create a proof-of-concept |
| 2 | Mac OS X application for Python. The process is far from streamlined, |
| 3 | and it will definitely change in future releases of Python, but I wanted to |
| 4 | include this in the current distribution so people could play with it. |
| 5 | |
| 6 | To create a fullblown Python.app proceed as follows. |
| 7 | |
| 8 | 1. In the main Python source directory configure python with |
| 9 | configure --enable-framework --with-suffix |
| 10 | 2. Do a "make clean" if you did a previous build, then "make". |
| 11 | 3. Install this as a framework with "make frameworkinstall". This puts a Python |
| 12 | framework into /Library/Frameworks. |
| 13 | 4. Come back here (Mac/OSX) and build and install the application, |
| 14 | with "make install". |
| 15 | 5. It is probably a good idea to add the Mac-specific modules to the framework, |
| 16 | with "make installmacsubtree". This puts a MacPython lib directory into |
| 17 | sys.prefix/Mac/Lib. Again, this is a temporary measure. |
Jack Jansen | 408c16f | 2001-09-11 11:30:02 +0000 | [diff] [blame^] | 18 | 6. To actually find the Lib directory installed in step 5 you add a line |
| 19 | to your site.py file (the one in /Library/Frameworks/....): |
| 20 | sys.path.append(os.path.join(sys.prefix, 'Mac/Lib')) |
| 21 | |
Jack Jansen | 0511b76 | 2001-09-06 16:36:42 +0000 | [diff] [blame] | 22 | You are now done. In your Applications you should have a "Python", with the icon |
| 23 | being a falling 16 Ton weight with a shadow under it. You can drop Python scripts |
| 24 | on this and the will be run, in a full-windowing environment. Note that you |
| 25 | do not get sys.stdin, and that sys.stdout goes to the console (Use |
| 26 | Applications/Utilities/Console to see it). |
| 27 | |
Jack Jansen | 408c16f | 2001-09-11 11:30:02 +0000 | [diff] [blame^] | 28 | For some reason the application only accepts files with TEXT type, not straight unix |
| 29 | typeless files. |
| 30 | |
Jack Jansen | 0511b76 | 2001-09-06 16:36:42 +0000 | [diff] [blame] | 31 | Something to take note of is that the ".rsrc" files in the distribution are not |
| 32 | actually resource files, they're AppleSingle encoded resource files. |
| 33 | |
Jack Jansen | 408c16f | 2001-09-11 11:30:02 +0000 | [diff] [blame^] | 34 | Jack Jansen, jack@oratrix.com, 11-Sep-01. |