pyobjc / pyobjc / Install.html

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Installation Instructions</title>
<h2>Installation Instructions</h2>
<!-- :authors: Bill Bumgarner, Ronald Oussoren -->
<h2><a name="building-the-package">Building the package</a></h2>
<p>If you're using the sources from CVS you should first download a copy of 
libffi from <a href="">the PyObjC download site</a>.  Extract this in a convenient location
and update the variable <code><span>LIBFF_SOURCES</span></code> at the top of  The released
version of PyObjC includes a compatible version of libffi.</p>
<p>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 <code><span>--help</span></code> command:</p>
% python --help
<p>To see an inventory of building and packaging commands, issue the
% python --help-commands
<p>The following command will build and install the pyobjc module:</p>
% python install
<p>The system can also be used to create source and binary
distribution archives automatically.</p>
<p>Use <code><span>sudo</span></code> to install the pyobjc module into a the Apple supplied
python's site-packages directory on OS X 10.2 and greater:</p>
<p>% sudo python install</p>
<p>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.</p>
<h2><a name="examples">Examples</a></h2>
<p>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).</p>
<p>CurrencyConverter and TableModel are both examples of standalone
Cocoa-Python applications.  To build and execute:</p>
% cd TableModel
% python build
<p>The WebServicesTool and TableModel2 are both examples of Cocoa-Python
applications created via the Cocoa-Python project template found in
the <code><span>Project</span> <span>Templates</span></code> directory.  Use Project Builder to build the
<h2><a name="project-templates">Project Templates</a></h2>
<p>The <code><span>Project</span> <span>Templates</span></code> directory contains project templates for
project builder.  Currently, there is one project builder template;  a
Cocoa-Python Application project template.   When installed, this adds
a project to Project Builder's project menu that allows new Cocoa
applications implemented entirely in Python to be created from within
Project Builder (in the same fashion as any other project).</p>
<p>To install, simply copy the project template into the Project Builder
project templates directory (or create a symlink).</p>
<p>More information on project templates can be found in the Project
Builder documentation and/or release notes.</p>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.