diff options
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 37 |
1 files changed, 15 insertions, 22 deletions
@@ -8,29 +8,21 @@ d = top APPNAME='py2cairo' VERSION='1.8.11' -cairo_version_required = '1.8.10' +cairo_version_required = '1.10.0' -def set_options(ctx): - print(' %s/set_options()' %d) +def options(ctx): + print(' %s/options()' %d) ctx.tool_options('gnu_dirs') ctx.tool_options('compiler_cc') ctx.tool_options('python') # options for disabling pyc or pyo compilation -def init(): - print(' %s/init()' %d) - -def shutdown(): - print(' %s/shutdown()' %d) - - def configure(ctx): print(' %s/configure()' %d) env = ctx.env ctx.check_tool('gnu_dirs') - ctx.check_tool('misc') ctx.check_tool('compiler_cc') ctx.check_tool('python') ctx.check_python_version((2,6,0)) @@ -57,18 +49,20 @@ def configure(ctx): def build(ctx): print(' %s/build()' %d) - ctx.add_subdirs('src') + ctx.recurse('src') # generate and install the .pc file - obj = ctx.new_task_gen('subst') - obj.source = 'pycairo.pc.in' - obj.target = 'pycairo.pc' - obj.dict = { - 'VERSION' : VERSION, - 'prefix' : ctx.env['PREFIX'], - 'includedir': os.path.join(ctx.env['PREFIX'], 'include'), - } - obj.install_path = os.path.join(ctx.env['LIBDIR'], 'pkgconfig') + ctx( + features = 'subst', + source = 'pycairo.pc.in', + target = 'pycairo.pc', + dct = { + 'VERSION' : VERSION, + 'prefix' : ctx.env['PREFIX'], + 'includedir': os.path.join(ctx.env['PREFIX'], 'include'), + }, + install_path = os.path.join(ctx.env['LIBDIR'], 'pkgconfig'), + ) def dist_hook(): @@ -93,4 +87,3 @@ def dist_hook(): for f in os.listdir(D): if f.endswith(('.pdf', '.png', '.ps', '.svg')): os.remove(os.path.join(D, f)) - |