Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (47 sloc) 2.33 KB
.. _install:
Installation
============
The first step before we start with actual coding consists of setting up
`PyGObject`_ and its dependencies. PyGObject is a Python module
that enables developers to access GObject-based libraries such as GTK+
within Python.
It exclusively supports GTK+ version 3 or later. If you want to use
GTK+ 2 in your application, use `PyGTK`_, instead.
Dependencies
------------
* GTK+3
* Python 2 (2.6 or later) or Python 3 (3.1 or later)
* gobject-introspection
Prebuilt Packages
-----------------
Recent versions of PyGObject and its dependencies are packaged by nearly all major Linux
distributions.
So, if you use Linux, you can probably get started by installing the package from the
official repository for your distribution.
Installing From Source
----------------------
The easiest way to install PyGObject from source is using `JHBuild`_. It is
designed to easily build source packages and discover what dependencies need to be
build and in what order. To setup JHBuild, please follow the `JHBuild manual`_.
Once you have installed JHBuild successfully, download the latest configuration from
[#]_. Copy files with the suffix `.modules` to JHBuild's module directory and the file
`sample-tarball.jhbuildrc` to `~/.jhbuildrc`.
If you have not done it before, verify that your build environment is setup correctly
by running::
$ jhbuild sanitycheck
It will print any applications and libraries that are currently missing on your
system but required for building. You should install those using your distribution's
package repository. A list of `package names <https://wiki.gnome.org/action/show/Projects/Jhbuild/Dependencies>`_
for different distributions is maintained on the GNOME wiki.
Run the command above again to ensure the required tools are present.
Executing the following command will build PyGObject and all its dependencies::
$ jhbuild build pygobject
Finally, you might want to install GTK+ from source as well::
$ jhbuild build gtk+-3
To start a shell with the same environment as used by JHBuild, run::
$ jhbuild shell
.. _PyGObject: https://wiki.gnome.org/action/show/Projects/PyGObject
.. _PyGTK: http://www.pygtk.org
.. _JHBuild: https://wiki.gnome.org/action/show/Projects/Jhbuild
.. _JHBuild manual: https://developer.gnome.org/jhbuild/unstable/
.. [#] https://download.gnome.org/teams/releng/