Application Deployment

There is currently no nice deployment story, but it’s not impossible. This is a list of random notes and examples.


On Linux there is no single strategy. Quod Libet uses distutils, MyPaint uses SCons. Gramps uses distutils.


On OSX you can use gtk-osx which is based on jhbuild and then gtk-mac-bundler for packaging things up and making libraries relocatable. With macOS bundles you generally have a startup shell script which sets all the various env vars relative to the bundle, similar to jhbuild.


On Windows things are usually build to be relocatable by default, so no env vars are needed. You can build/install through MSYS2, copy the bits you need and you are done. For GUI application you’ll also need an exe launcher that links against the python dll.

Example Deployments

  • Quod Libet provides a Windows installer based on MSYS2 and NSIS3. On macOS, jhbuild is used for building, gtk.mac-bundler for packing things up and dmgbuild for creating a dmg. distutis is used for building/installing the application into the final environment. Most of this is automated and scripts can be found in the git repo.

  • MyPaint provides a Windows installer based on MSYS2 and Inno Setup. It uses SCons for building/installing the application.

  • Passphraser uses the Hello World GTK template build system (see below).

Other options

  • PyInstaller is a program that freezes (packages) Python programs into stand-alone executables, under Windows, Linux, Mac OS X, and more. PyInstaller’s packager has built-in support for automatically including PyGObject dependencies with your application without requiring additional configuration.

  • Hello World GTK is a template build system for distributing Python-based GTK applications on Windows, macOS, and Linux. First, an application directory is assembled using PyInstaller. Then, a different program is used to package the resulting directory. For Windows, NSIS3 is used. For macOS, the built-in hdiutil is used. For Linux, AppImageKit is used.