summaryrefslogtreecommitdiff
path: root/src/wscript
blob: ca51a88248d9dd7829d9dc66b92d0afe2a7fcbe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- python -*-

import os


d = 'src'

def build(ctx):
  print('  %s/build()' %d)
  pycairoLibDir = os.path.join(ctx.env['LIBDIR'],
                               'python'+ctx.env['PYTHON_VERSION'],
                               'site-packages', 'cairo')

  # .py files
  ctx.new_task_gen(
    features     = 'py',
    source       = '__init__.py',
    install_path = pycairoLibDir,
    )

  # C extension module
  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
  ctx.install_files(os.path.join(ctx.env['PREFIX'], 'include', 'pycairo'),
                    'py3cairo.h')

  # how to strip binaries ?