2001-11-09 18:19:16 -05:00
|
|
|
Building wxPython on Mac OS X
|
|
|
|
-----------------------------
|
|
|
|
|
2002-05-30 14:40:57 -04:00
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
These are the steps I have used for building wxPython on Mac OS X 10.x
|
2001-11-09 18:19:16 -05:00
|
|
|
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.
|
|
|
|
|
|
|
|
|
2003-10-01 20:58:06 -04:00
|
|
|
1. "MacPython-OSX" 2.3 is required. If you don't have it already there is a disk image with an
|
|
|
|
installer package at
|
2002-05-30 14:40:57 -04:00
|
|
|
|
2003-10-01 20:58:06 -04:00
|
|
|
http://homepages.cwi.nl/~jack/macpython/download.html
|
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
|
2003-03-25 01:35:27 -05:00
|
|
|
source from www.python.org and follow the instructions in the
|
|
|
|
Mac/OSX/README file to build and install the Python.framework and
|
|
|
|
Python tools.
|
2002-05-30 14:40:57 -04:00
|
|
|
|
|
|
|
One last thing, make sure that /usr/local/bin is in your PATH
|
2003-03-25 01:35:27 -05:00
|
|
|
environment variable since that is where the new python and pythonw
|
|
|
|
commands will be located.
|
2002-05-30 14:40:57 -04:00
|
|
|
|
|
|
|
|
2003-03-25 01:35:27 -05:00
|
|
|
2. In a wxWindows CVS tree make a build directory. (You can also use
|
|
|
|
a CVS snapshot located in http://wxwindows.org/snapshots/ or the
|
|
|
|
released wxPythonSrc-*.tr.gz archive.)
|
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
|
2003-10-18 00:29:53 -04:00
|
|
|
../configure --with-mac \
|
2003-10-01 20:58:06 -04:00
|
|
|
--with-opengl \
|
|
|
|
--enable-geometry \
|
|
|
|
--enable-optimise \
|
|
|
|
--with-libjpeg=builtin \
|
|
|
|
--with-libpng=builtin \
|
|
|
|
--with-libtiff=builtin \
|
|
|
|
|
|
|
|
If you want to add code that activates various runtime checks and
|
|
|
|
assertion exceptions then add --enable-debug_flag.
|
2001-11-09 18:19:16 -05:00
|
|
|
|
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
|
2003-03-25 01:35:27 -05:00
|
|
|
python setup.py build install
|
|
|
|
|
|
|
|
If you would like to install to someplace besides the Python
|
|
|
|
site-packages directory (such as to your home directory) then you
|
|
|
|
can add "--root=<path>" after the "install" command. To use
|
|
|
|
wxPython like this you'll need to ensure that the directory
|
|
|
|
containing wxPyrthon is contained in in the PYTHONPATH environment
|
|
|
|
variable.
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|