--- py2cairo-1.10.0/wscript +++ py2cairo-1.10.0/wscript @@ -10,6 +10,7 @@ APPNAME='py2cairo' VERSION='1.10.0' cairo_version_required = '1.10.0' +xpyb_version_required = '1.3' def check_svg(): @@ -23,6 +24,17 @@ return False +def check_xpyb(): + if os.environ.get('PYCAIRO_DISABLE_XPYB', None) is None: + return_code = subprocess.call(['pkg-config', '--exists', 'xpyb']) + if return_code == 0: + return True + else: + return False + else: + return False + + def options(ctx): print(' %s/options()' %d) ctx.tool_options('gnu_dirs') @@ -41,6 +53,9 @@ ctx.check_python_headers() ctx.check_cfg(package='cairo', atleast_version=cairo_version_required, args='--cflags --libs') + if check_xpyb(): + ctx.check_cfg(package='xpyb', atleast_version=xpyb_version_required, + args='--cflags --libs', mandatory=False) # add gcc options if env['CC_NAME'] == 'gcc':