Install the GTK3 Core Library with the Jhbuild installation Jhbuild installation pygobject and GTK Windows installation
Pygobject is a Python module that enables developers to access gobject based libraries, such as GTK + in Python. It exclusively supports GTK+3 version or later.
Since bloggers use a MacBook, the installation method applies to Mac OS X, and other systems are roughly the same. using Jhbuild installation Install Jhbuild
$ brew Install wget
$ sh gtk-osx-build-setup.sh
setting environment variable
$ export path=~/.local/bin: $PATH
$ jhbuild Bootstrap
Possible error:
1.jhbuild:the default location of the configuration file has changed. Please MOVE/USERS/XIAOSANYU/.JHBUILDRC TO/USERS/XIAOSANYU/.CONFIG/JHBUILDRC.
Solution:
$ CP/USERS/XIAOSANYU/.JHBUILDRC/USERS/XIAOSANYU/.CONFIG/JHBUILDRC
$ RM/USERS/XIAOSANYU/.JHBUILDRC
2.ENVIRONMENTERROR:MACOSX10.10.SDK not found
Solution:
Download MACOSX10.10.SDK, put the unpacked folder under the following path
applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/
3.configure:error:xml::P arser perl module is required for Intltool
Solution:
Download Xml-parser
Compile and install after decompression
$ perl makefile.pl
$ make
$ make install
Install GTK3 Core library
$ jhbuild Build Meta-gtk-osx-gtk3
If you have an error:
Checking for xml::simple ... configure:error:xml::simple perl module is required for icon-naming-utils
Choose 4
$ cpan Install Xml::simple
Enter the website http://download.gnome.org/teams/releng/download the latest XXX. Modules
Put it in the ~/source/jhbuild/modulesets.
Then modify ~/.CONFIG/JHBUILDRC, and finally add
Use_local_modulesets = True
Makeargs = '-j16 '
moduleset = ' gnome-apps-3.20 '
autogenargs= '-- Disable-static--disable-gtk-doc python=python3 '
modules = [' Meta-gnome-core ', ' meta-gnome-apps-tested ']
Skip = [' Telepathy-logger ', ' gtk-doc ', ' glade ', ' Telepathy-mission-control ', ' gnome-photos ', ' gitg ', ' Vala ', ' gdlmm ']
module_autogenargs[' pygobject ']= '--with-python=/library/frameworks/python.framework/versions/3.4/bin/ python3.4 '
module_autogenargs[' glib-networking ']= '--without-ca-certificates '
Installing Pygobject and GTK +
$ jhbuild sanitycheck
$ jhbuild Build pygobject
$ jhbuild Build GTK +
If the error
No package ' cairo-gobject ' found
$ git clone Git://anongit.freedesktop.org/git/cairo
$ cd Cairo
$/autogen.sh--PREFIX=/USERS/XIAOSANYU/GTK /inst python=python3 --enable-xcb-shm --enable-quartz
$ make-j16
$ make Install
Error requested ' Libpcre >= 8.13 ' but version of Libpcre is 8.02
Download Libpcre
$ tar-vxzf/users/xiaosanyu/downloads/pcre-8.38.tar.gz
$ cd pcre-8.38
$./configure--enable-pcre16-- Enable-pcre32--ENABLE-UCP--enable-unicode-properties--enable-rebuild-chartables--enable-newline-is-any
$ Make
$ make install
$ export pkg_config_path=/usr/local/lib/pkgconfig: $PKG _config_path
Error no package ' Py3cairo ' found
Install Py3cairo
$ git clone Git://git.cairographics.org/git/pycairo
$ cd Pycairo
$ python3 setup.py install
$ export Pkg_ Config_path=/library/frameworks/python.framework/versions/3.4/lib/pkgconfig: $PKG _config_path
Once successful, copy the contents of the ~/gtk/inst/lib/python3.4/site-packages to the Python3 site-packages directory under Windows installation
See another blog from the blogger
http://blog.csdn.net/a87b01c14/article/details/52229393
Code download address: http://download.csdn.net/detail/a87b01c14/9594728