Installation Instructions

Building the package

If you're using the sources from CVS you should first download a copy of libffi from the PyObjC download site. Extract this in a convenient location and update the variable LIBFF_SOURCES at the top of setup.py. The released version of PyObjC includes a compatible version of libffi.

PyObjC is build and installed using the distutils package included with Python 2.0 and beyond. This package provides a single interface for building and packaging the module. To see usage documentation for the module, issue the --help command:

% python setup.py --help

To see an inventory of building and packaging commands, issue the command:

% python setup.py --help-commands

The following command will build and install the pyobjc module:

% python setup.py install

The setup.py system can also be used to create source and binary distribution archives automatically.

Use sudo to install the pyobjc module into a the Apple supplied python's site-packages directory on OS X 10.2 and greater:

% sudo python setup.py install

If you have multiple versions of python installed on your system, the above will only install pyobjc for whatever version of python is the default on the command line. Make sure you are installing python against the correct version of python.

To be able to build the wrappers for the WebKit framework (included with Safari 1.0), you'll have to install the WebKit SDK. You can download this from the ADC website.

Examples

The examples directory contains a number of projects that demonstrate various features of the PyObjC bridge. The scripts at the top level of the examples directory were mostly written to test a particular feature of the bridge (or document a bug until a fix could be found).

CurrencyConverter and TableModel are both examples of standalone Cocoa-Python applications. To build and execute:

% cd TableModel
% python buildapp.py build

The WebServicesTool is an example of Cocoa-Python applications created via the Cocoa-Python project template found in the ProjectBuilder Extras/Project Templates directory. Use Project Builder to build the applications.

Project Templates

The ProjectBuilder Extras directory contains additional files that can be used with Project Builder. The directory Specifications contains files that enable syntax coloring for Python files in Project Builder.

The Project Templates directory contains project templates for Project Builder. These have to be copied to /Developer/ProjectBuilder Extras/Project Templates/Application before they are useable from Project Builder.

There are three templates available:

More information on project templates can be found in the Project Builder documentation and/or release notes.