Building from source with macports
Note: there is another method documented here.
This method is useful for development, but not for building self-contained packages.
MacPorts
First, install macports.
Configure macports so that it will build GTK and its libraries against aqua rather X11 by adding the following options to
${prefix}/etc/macports/variants.conf:
+no_x11 -x11 +quartz
When using py2app it is quite likely that you will encounter this error: "ValueError: New Mach-O header is too large to relocate"
so you should probably prevent it by adding the link option
"-Xlinker -headerpad_max_install_names" (see here for more details)
Main Python packages from MacPorts
Install the following ports for Python 2.6:
port install py26-crypto py26-gtk py26-py2app py26-distribute py26-twisted gtk-osx-application python_select
Or if using Python 2.7:
port install py27-crypto py27-gtk py27-py2app py27-distribute py27-twisted gtk-osx-application python_select
distributesupercedessetuptoolson osx- Python 2.5 is no longer supported
- Building macports on
AMDCPUs may require adding: "--host=none-apple-darwin ABI=long" to theconfigurestage of some ports (gmpfor example)
Ensure that the targeted version of Python is the one selected with:
python_select python26
(or python27 obviously)
Other Python packages
You must also install some python libraries which are not available from macports,
the easiest way is to use easy_install (installed above as part of distribute):
easy_install netifaces pam pyutmp pyasn1
Build Package
From the source tree, you can create the installer package using:
python ./setup.py py2app
Or install locally using the script provided:
sudo ./release/local-install.sh
Caveats:
- zope.interface issue: create a blank
zope/__init__.py You forgot to call g_type_init()
Extra packages: VNC, Xpra, NX..
You can install TigerVNC using macports:
port install tigervnc
NX and xpra have to be compiled from source manually, see here.
We do provide some unsupported binaries that you can try here.
Note: SSH X11-forwaring may be disabled by default on Mac OS X, you will need to enable it and restart
sshd to use the ssh mode.