--- pycairo-1.10.0/wscript +++ pycairo-1.10.0/wscript @@ -10,6 +10,7 @@ APPNAME='pycairo' VERSION='1.10.0' cairo_version_required = '1.10.0' +xpyb_version_required = '1.3' # optional 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') @@ -42,6 +54,12 @@ ctx.check_cfg(package='cairo', atleast_version=cairo_version_required, args='--cflags --libs') +# xpyb for Python 3 is not available yet. +# the Python 3 version should probably have a different name than 'xpyb' +# 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': env.append_unique('CCFLAGS', ['-std=c99', '-Wall'])