PyGObject uses the standard autotools for the build infrastructure. To build, it should be as simple as running:
$ ./configure --prefix=<prefix where python is installed> my python2.7 is in /usr/lib/python2.7 will i write : ./configure --prefix=/usr/lib/python2.7 or ./configure --prefix=/usr/lib
-- http://mail.python.org/mailman/listinfo/python-list