2001-11-09 18:19:16 -05:00
|
|
|
Building wxPython on Mac OS X
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
NOTE: OS X support is HIGHLY EXPERIMENTAL at this time. Most things
|
2002-05-30 14:40:57 -04:00
|
|
|
are working now, but a few still don't. I know about most of
|
|
|
|
them and am addressing them as I have time. If you have any
|
|
|
|
ideas about a fix for the stuff that's still broken then
|
|
|
|
please persue them and send the fixes to me.
|
|
|
|
|
2001-11-09 18:19:16 -05:00
|
|
|
|
|
|
|
These are the steps I have used for building wxPython on Mac OS X 10.1
|
|
|
|
with the Apple Developer Tools, a.k.a the Darwin version. I assume
|
|
|
|
that you know your way around a command line and that you know how to
|
|
|
|
get things from various CVS repositories as needed.
|
|
|
|
|
|
|
|
|
2002-05-30 14:40:57 -04:00
|
|
|
1. Python 2.2 is required. There is a disk image with an installer
|
|
|
|
package in the wxPython Sourceforge download area, in this group:
|
|
|
|
|
|
|
|
http://sourceforge.net/project/showfiles.php?group_id=10718&release_id=84730
|
2001-11-09 18:19:16 -05:00
|
|
|
|
2002-05-30 14:40:57 -04:00
|
|
|
If, for some reason you need to build your own Python, get the
|
|
|
|
source from www.python.org and follow theinstructions in the
|
|
|
|
Mac/OSX/README file to build and install Python.app and the
|
|
|
|
Python.framework.
|
|
|
|
|
|
|
|
If you build your own Python then you may want to make a symlink or
|
|
|
|
two in /usr/local/bin so that this version of Python can be found
|
|
|
|
from the command line. For example:
|
2001-11-09 18:19:16 -05:00
|
|
|
|
|
|
|
cd /usr/local/bin
|
2002-01-16 11:10:52 -05:00
|
|
|
sudo ln -s /Library/Frameworks/Python.framework/Versions/2.2/bin/python2.2 python2.2
|
2001-11-09 18:19:16 -05:00
|
|
|
sudo ln -s python2.2 python
|
|
|
|
|
2002-05-30 14:40:57 -04:00
|
|
|
Also, if you create a /usr/local/bin/pythonw script like the
|
|
|
|
following then you can run Python GUI apps (like wxPython) directly
|
|
|
|
from the command line:
|
|
|
|
|
|
|
|
#!/bin/sh
|
|
|
|
exec /Applications/Python.app/Contents/MacOS/python $@
|
|
|
|
|
|
|
|
Be sure to give this script execute permissions:
|
|
|
|
|
|
|
|
sudo chmod +x /usr/local/bin/pythonw
|
|
|
|
|
|
|
|
If you would like to make a MachoPython installer from what you
|
|
|
|
built then you may want to look at the scripts I use to do it
|
|
|
|
located in wxPython/distrib/mac/buildPython.
|
|
|
|
|
|
|
|
One last thing, make sure that /usr/local/bin is in your PATH
|
|
|
|
environment variable.
|
|
|
|
|
|
|
|
|
|
|
|
2. In a wxWindows CVS tree make a build directory.
|
2001-11-09 18:19:16 -05:00
|
|
|
|
|
|
|
cd ~/proj/wxWindows # or wherever you put it
|
|
|
|
mkdir build
|
|
|
|
|
2002-05-30 14:40:57 -04:00
|
|
|
3. Run configure from that build directory.
|
2001-11-09 18:19:16 -05:00
|
|
|
|
|
|
|
cd build
|
|
|
|
../configure --with-mac --with-opengl --enable-debug
|
|
|
|
|
2002-05-30 14:40:57 -04:00
|
|
|
4. Make and install wxMac.
|
2001-11-09 18:19:16 -05:00
|
|
|
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
|
2002-05-30 14:40:57 -04:00
|
|
|
5. Build and install wxPython.
|
2001-11-09 18:19:16 -05:00
|
|
|
|
|
|
|
cd ../wxPython
|
2002-05-30 14:40:57 -04:00
|
|
|
python setup.py IN_CVS_TREE=1 build install
|
2001-11-09 18:19:16 -05:00
|
|
|
|
2002-05-30 14:40:57 -04:00
|
|
|
6. Test. Just navigate in the Finder to the demo directory and double
|
2002-02-06 16:03:27 -05:00
|
|
|
click demo.py, or simple.py, or whatever you want to run. Or from
|
|
|
|
a command line you can run it this way:
|
|
|
|
|
2002-05-30 14:40:57 -04:00
|
|
|
cd demo
|
|
|
|
pythonw demo.py
|
2001-11-09 18:19:16 -05:00
|
|
|
|
2002-05-30 14:40:57 -04:00
|
|
|
7. Figure out what's wrong, figure out how to fix it, and then send
|
2001-11-09 18:19:16 -05:00
|
|
|
the patches to me. <wink>
|
|
|
|
|
|
|
|
--Robin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|