Building NodeBox

Do you need a build?

If you want to use NodeBox as a Python module inside of another application or from the command line, you might not need your own custom build. Read the console instructions for more information.

Leopard support

These instructions only work on Mac OS X 10.4. Builds created on 10.4 work on Leopard as well, but not the other way around. Also, PyObjC 2 is bundled with 10.5, but this version is incompatible with 10.4. Because we don't want to give up on 10.4 users, this is the way to go. If PyObjC 2 is ever back-ported to Tiger, we might support building on Leopard as well.

Getting the source

Read the download instructions for information on how to get the NodeBox source.

Requirements

Before you can get started, you need the following packages:

  • Python 2.5: The built-in Python 2.3 is unsupported on Leopard -- 2.5 works fine.
  • PyObjC: The layer allowing access to Cocoa from Python. (NodeBox is incompatible with version 2.0. Use revision 1985 from the SVN repository.)
  • py2app: An extension to distutils to create proper OS X applications.
  • Cheetah: Cheetah templates - for the help files.
  • Psyco: For speeding up execution on Intel processors.
  • Numpy: For math-intensive calculations.

Build PyObjC using the standard python setup.py install, and not with the suggested bdist_mpkg.

Use the same command for py2app as well.

Psyco needs a patch to fail-fast on PowerPC processors (otherwise NodeBox crashes when using Psyco). The patch is attached to this page. Apply it by cd-ing into the psyco directory and typing:

patch -p0 < psyco-processor-check.patch

You can install Numpy by just running:

easy_install numpy

This installs the Python egg in the site-packages.

Building the dependencies

The NodeBox source is dependend on a few libraries; all of them are in the libs folder. Building them is simple: just cd into each subdirectory and type

sudo python setup.py install

This will install the libraries into your Python's site-packages, where they will be available for py2app to pick up.

Building

Once you have the required libraries set up, you can go to the command-line and use the following command to build NodeBox.

    python macsetup.py py2app -A

This creates a "linked" version, that links to your source directory, and is ideal for development purposes. The resulting application is a lot smaller than a full build, because none of the dependencies are copied into the app. Changing the source doesn't require a build: just restart the application.

To create a full-fledged NodeBox version, use the shell command:

    ./macbuild.sh

This will build a new NodeBox in the "dist" folder, and create a zip file called NodeBox?-latest.zip that contains the version we distribute. This is a standalone version, bundling Python and PyObjC, so users can just download and double-click.

Attachments