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

Skip to content

Commit 1f74ed8

Browse files
committed
Fixed a typo in the binary install notes
rewrapped: as usual with my files everything was far wider than 80 chars.
1 parent 3a70e3f commit 1f74ed8

1 file changed

Lines changed: 72 additions & 66 deletions

File tree

Mac/OSX/README

Lines changed: 72 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ It is rather terse and probably incomplete, please send me feedback.
77
1. Why would I want a framework Python in stead of a normal static Python?
88
--------------------------------------------------------------------------
99

10-
The main reason is because you want to create GUI programs in Python. With
11-
the exception of X11/XDarwin-based GUI toolkits it appears that all GUI programs
10+
The main reason is because you want to create GUI programs in Python. With the
11+
exception of X11/XDarwin-based GUI toolkits it appears that all GUI programs
1212
need to be run from a fullblown MacOSX application (a ".app" bundle).
1313

14-
While it is technically possible to create a .app without using frameworks
15-
you will have to do the work yourself if you really want this.
14+
While it is technically possible to create a .app without using frameworks you
15+
will have to do the work yourself if you really want this.
1616

17-
A second reason for using frameworks is that they put Python-related items
18-
in only two places: /Library/Framework/Python.framework and /Applications/Python.
17+
A second reason for using frameworks is that they put Python-related items in
18+
only two places: /Library/Framework/Python.framework and /Applications/Python.
1919
This simplifies matters for users installing Python from a binary distribution
20-
if they want to get rid of it again. Moreover, due to the way frameworks
21-
work a user without admin privileges can install a binary distribution in
22-
his or her home directory without recompilation.
20+
if they want to get rid of it again. Moreover, due to the way frameworks work
21+
a user without admin privileges can install a binary distribution in his or
22+
her home directory without recompilation.
2323

2424
2. How does a framework Python differ from a normal static Python?
2525
------------------------------------------------------------------
@@ -34,55 +34,56 @@ Versions/Current and you will see the familiar bin and lib directories.
3434
----------------------------
3535

3636
Yes, probably. If you want to be able to use the PythonIDE you will need to
37-
get Waste, an all-singing-all-dancing TextEdit replacement, from www.merzwaren.com.
38-
It will unpack into a folder named something like "Waste 2.1 Distribution". Make
39-
a symlink called "waste" to this folder, somewhere beside your Python source
40-
distribution (it can be "../waste", "../../waste", etc).
41-
42-
If you want Tkinter support you need to get the OSX AquaTk distribution. If you
43-
want wxPython you need to get that. If you want Cocoa you need to get pyobjc.
44-
Because all these are currently in a state of flux please refer to
37+
get Waste, an all-singing-all-dancing TextEdit replacement, from
38+
www.merzwaren.com. It will unpack into a folder named something like "Waste
39+
2.1 Distribution". Make a symlink called "waste" to this folder, somewhere
40+
beside your Python source distribution (it can be "../waste", "../../waste",
41+
etc).
42+
43+
If you want Tkinter support you need to get the OSX AquaTk distribution. If
44+
you want wxPython you need to get that. If you want Cocoa you need to get
45+
pyobjc. Because all these are currently in a state of flux please refer to
4546
http://www.cwi.nl/~jack/macpython.html, which should contain pointers to more
4647
information.
4748

4849
4. How do I build a framework Python?
4950
-------------------------------------
5051

5152
This directory contains a Makefile that will create a couple of python-related
52-
applications (fullblown OSX .app applications, that is) in /Applications/Python,
53-
and a hidden helper application Python.app inside the Python.framework, and
54-
unix tools "python" and "pythonw" into /usr/local/bin. In addition
55-
it has a target "installmacsubtree" that installs the relevant portions of the
56-
Mac subtree into the Python.framework.
53+
applications (fullblown OSX .app applications, that is) in
54+
/Applications/Python, and a hidden helper application Python.app inside the
55+
Python.framework, and unix tools "python" and "pythonw" into /usr/local/bin.
56+
In addition it has a target "installmacsubtree" that installs the relevant
57+
portions of the Mac subtree into the Python.framework.
5758

5859
It is normally invoked indirectly through the main Makefile, as the last step
5960
in the sequence
6061
1. configure --enable-framework
6162
2. make
6263
3. make frameworkinstall
6364

64-
This sequence will put the framework in /Library/Framework/Python.framework,
65-
the applications in /Applications/Python and the unix tools in /usr/local/bin.
65+
This sequence will put the framework in /Library/Framework/Python.framework,
66+
the applications in /Applications/Python and the unix tools in /usr/local/bin.
6667

67-
Building in another place, for instance $HOME/Library/Frameworks if you have no
68-
admin privileges on your machine, has only been tested very lightly. This can be done
69-
by configuring with --enable-framework=$HOME/Library/Frameworks. The other two
70-
directories, /Applications/Python and /usr/local/bin, will then also be deposited
71-
in $HOME. This is sub-optimal for the unix tools, which you would want in $HOME/bin,
72-
but there is no easy way to fix this right now.
68+
Building in another place, for instance $HOME/Library/Frameworks if you have
69+
no admin privileges on your machine, has only been tested very lightly. This
70+
can be done by configuring with --enable-framework=$HOME/Library/Frameworks.
71+
The other two directories, /Applications/Python and /usr/local/bin, will then
72+
also be deposited in $HOME. This is sub-optimal for the unix tools, which you
73+
would want in $HOME/bin, but there is no easy way to fix this right now.
7374

74-
Note that there are no references to the actual locations in the code or resource
75-
files, so you are free to move things around afterwards. For example, you could
76-
use --enable-framework=/tmp/newversion/Library/Frameworks and use /tmp/newversion
77-
as the basis for an installer or something.
75+
Note that there are no references to the actual locations in the code or
76+
resource files, so you are free to move things around afterwards. For example,
77+
you could use --enable-framework=/tmp/newversion/Library/Frameworks and use
78+
/tmp/newversion as the basis for an installer or something.
7879

7980
If you want to install some part, but not all, read the main Makefile. The
80-
frameworkinstall is composed of a couple of sub-targets that install the framework
81-
itself, the Mac subtree, the applications and the unix tools.
81+
frameworkinstall is composed of a couple of sub-targets that install the
82+
framework itself, the Mac subtree, the applications and the unix tools.
8283

83-
If you want to run the Makefile here directly, in stead of through the main Makefile,
84-
you will have to pass various variable-assignments. Read the beginning of the Makefile
85-
for details.
84+
If you want to run the Makefile here directly, in stead of through the main
85+
Makefile, you will have to pass various variable-assignments. Read the
86+
beginning of the Makefile for details.
8687

8788

8889
5. What do all these programs do?
@@ -93,39 +94,42 @@ debugger, etc.
9394

9495
PythonLauncher.app is a helper application that will handle things when you
9596
double-click a .py, .pyc or .pyw file. For the first two it creates a Terminal
96-
window and runs the scripts with the normal command-line Python. For the latter
97-
it runs the script in the Python.app interpreter so the script can do GUI-things.
98-
Keep the "alt" key depressed while dragging or double-clicking a script to set
99-
runtime options. These options can be set once and for all through PythonLauncher's
100-
preferences dialog.
97+
window and runs the scripts with the normal command-line Python. For the
98+
latter it runs the script in the Python.app interpreter so the script can do
99+
GUI-things. Keep the "alt" key depressed while dragging or double-clicking a
100+
script to set runtime options. These options can be set once and for all
101+
through PythonLauncher's preferences dialog.
101102

102103
BuildApplet.app creates an applet from a Python script. Drop the script on it
103-
and out comes a full-featured MacOS application. There is much more to this, to
104-
be supplied later. Some useful (but outdated) info can be found in Mac/Demo.
104+
and out comes a full-featured MacOS application. There is much more to this,
105+
to be supplied later. Some useful (but outdated) info can be found in
106+
Mac/Demo.
105107

106-
The commandline scripts /usr/local/bin/python and pythonw
107-
can be used to run non-GUI and GUI python scripts from the command line, respectively.
108+
The commandline scripts /usr/local/bin/python and pythonw can be used to run
109+
non-GUI and GUI python scripts from the command line, respectively.
108110

109111
6. How do I create a binary distribution?
110112
-----------------------------------------
111113

112114
Note: this section is work-in-progress.
113115

114-
First, to make sure there's no contamination, it is best to remove your existing Python
115-
installation (clear out /Library/Frameworks/Python.framework and /Applications/Python).
116-
Also, after build/install is finished check that nothing has shown up in those two locations.
116+
First, to make sure there's no contamination, it is best to remove your
117+
existing Python installation (clear out /Library/Frameworks/Python.framework
118+
and /Applications/Python). Also, after build/install is finished check that
119+
nothing has shown up in those two locations.
117120

118-
Create a subdirectory of the main python directory, say build-pythondist. In there, run
119-
../configure --enable-framework=/tmp/pythondist/Library/Frameworks/Python.framework \
121+
Create a subdirectory of the main python directory, say build-pythondist. In
122+
there, run
123+
../configure --enable-framework=/tmp/pythondist/Library/Frameworks \
120124
LDFLAGS=-Wl,-x
121125
make
122126
make frameworkinstall
123-
This installs a complete distribution set in /tmp/pythondist: in a framework build all other
124-
pathnames are computed from the framework pathname.
127+
This installs a complete distribution set in /tmp/pythondist: in a framework
128+
build all other pathnames are computed from the framework pathname.
125129

126-
Note that the unix tools in /tmp/pythondist are wrong, these have to be removed, and the
127-
installer post-install script should recreate them on the target system. Also, the .pyc and
128-
.pyo files need to be removed:
130+
Note that the unix tools in /tmp/pythondist are wrong, these have to be
131+
removed, and the installer post-install script should recreate them on the
132+
target system. Also, the .pyc and .pyo files need to be removed:
129133
rm -rf /tmp/pythondist/usr
130134
python.exe ../Mac/script/zappycfiles.py /tmp/pythondist
131135

@@ -136,13 +140,15 @@ TBD: documentation.
136140
7. Odds and ends.
137141
-----------------
138142

139-
The PythonLauncher is actually an Objective C Cocoa app built with Project Builder.
140-
It could be a Python program, except for the fact that pyobjc is not a part of
141-
the core distribution, and is not completely finished yet as of this writing.
143+
The PythonLauncher is actually an Objective C Cocoa app built with Project
144+
Builder. It could be a Python program, except for the fact that pyobjc is not
145+
a part of the core distribution, and is not completely finished yet as of this
146+
writing.
142147

143-
Something to take note of is that the ".rsrc" files in the distribution are not
144-
actually resource files, they're AppleSingle encoded resource files. The macresource
145-
module and the Mac/OSX/Makefile cater for this, and create ".rsrc.df.rsrc" files
146-
on the fly that are normal datafork-based resource files.
148+
Something to take note of is that the ".rsrc" files in the distribution are
149+
not actually resource files, they're AppleSingle encoded resource files. The
150+
macresource module and the Mac/OSX/Makefile cater for this, and create
151+
".rsrc.df.rsrc" files on the fly that are normal datafork-based resource
152+
files.
147153

148-
Jack Jansen, [email protected], 12-Aug-02
154+
Jack Jansen, [email protected], 06-Sep-02

0 commit comments

Comments
 (0)