summaryrefslogtreecommitdiff
path: root/src/wscript
blob: d6af7090f893ea7668382168ea0b3edf22e9efac (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
36
37
38
39
40
41
42
# -*- 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(
    features     = 'py',
    source       = '__init__.py',
    install_path = pycairoLibDir,
    )

  # C extension module
  ctx(
    features     = 'c cshlib pyext',
    source       = ['cairomodule.c',
                    'context.c',
                    'font.c',
                    'path.c',
                    'pattern.c',
                    'region.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 ?