# -*- python -*-
# encoding: utf-8


def configure(conf):
    conf.env['ENABLE_GTOP'] = bool(conf.check_pkg(
            'libgtop-2.0 >= 2.13.0 pygobject-2.0 ',
            destvar='GTOP', mandatory=False))

def build(bld):
    
    if bld.env()['ENABLE_GTOP']:
        pyext = bld.create_obj('cc', 'plugin', 'pyext')
        pyext.source = 'gtop.c'
        pyext.target = 'gtop'
        pyext.uselib = 'GTOP'
        pyext.install_var = 'PYTHONDIR'
        pyext.install_subdir = 'gtk-2.0'

