diff options
author | Steve Chaplin <> | 2010-09-18 15:08:55 +0800 |
---|---|---|
committer | Steve Chaplin <> | 2010-09-18 15:08:55 +0800 |
commit | f9c3e4a5dcd0c34c15485458580b7a380ef03204 (patch) | |
tree | a5d90473042d2c8973b808ecfed43885f5348790 /src/wscript | |
parent | 79950d982973947e412c44fde63327b6982bfc1a (diff) | |
download | py2cairo-f9c3e4a5dcd0c34c15485458580b7a380ef03204.tar.gz |
Add './waf configure --libdir' option.
Diffstat (limited to 'src/wscript')
-rw-r--r-- | src/wscript | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/src/wscript b/src/wscript index 0680c1c..9994780 100644 --- a/src/wscript +++ b/src/wscript @@ -5,28 +5,37 @@ import os d = 'src' -def build(bld): - print(' %s/build' %d) - +def build(ctx): + print(' %s/build()' %d) + pycairoLibDir = os.path.join(ctx.env['LIBDIR'], + 'python'+ctx.env['PYTHON_VERSION'], + 'site-packages', 'cairo') # .py files - bld.new_task_gen( - features = 'py', - source = '__init__.py', - install_path = '${PYTHONDIR}/cairo', + ctx.new_task_gen( + features = 'py', + source = '__init__.py', + install_path = pycairoLibDir, ) # C extension module - bld.new_task_gen( - features = 'cc cshlib pyext', - source = 'cairomodule.c context.c font.c path.c pattern.c matrix.c surface.c', - target = '_cairo', - includes = '.', - uselib = 'CAIRO', - install_path = '${PYTHONDIR}/cairo', + ctx.new_task_gen( + features = 'cc cshlib pyext', + source = ['cairomodule.c', + 'context.c', + 'font.c', + 'path.c', + 'pattern.c', + 'matrix.c', + 'surface.c', + ], + target = '_cairo', + includes = '.', + uselib = 'CAIRO', + install_path = pycairoLibDir, ) # C API - bld.install_files(os.path.join(bld.env['PREFIX'], 'include', 'pycairo'), + ctx.install_files(os.path.join(ctx.env['PREFIX'], 'include', 'pycairo'), 'pycairo.h') # how to strip binaries ? |