File: wscript

package info (click to toggle)
pybindgen 0.20.0%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,932 kB
  • sloc: python: 15,981; cpp: 1,889; ansic: 617; makefile: 86; sh: 4
file content (60 lines) | stat: -rw-r--r-- 1,681 bytes parent folder | download | duplicates (6)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
## -*- python -*-

def build(bld):
    ## manual code generation using simple pybindgen API calls
    gen = bld(
        features='command',
        source='modulegen.py',
        target='amodule.cc',
        command='${PYTHON} ${SRC[0]} > ${TGT[0]}')

    if bld.env['CXX']:
        obj = bld(features=['cxx', 'cxxshlib', 'pyext'])
        obj.source = [
            'a.cc',
            'amodule.cc'
            ]
        obj.target = 'a'
        obj.install_path = None # do not install
        obj.includes = '.'


    if bld.env['ENABLE_PYGCCXML']:
        ## gccxml direct generation method
        bld(
            features='command',
            source='module-autogen.py a.h',
            target='a1module.cc',
            command='${PYTHON} ${SRC[0]} ${SRC[1]} > ${TGT[0]}')

        obj = bld(features=['cxx', 'cxxshlib', 'pyext'])
        obj.source = [
            'a.cc',
            'a1module.cc'
            ]
        obj.target = 'a1'
        obj.install_path = None # do not install
        obj.includes = '.'


        ## gccxml indirect generation method
        bld(
            features='command',
            source='module-autoscan.py a.h',
            target='a2modulegen.py',
            command='${PYTHON} ${SRC[0]} ${SRC[1]} > ${TGT[0]}')

        bld(
            features='command',
            source='a2modulegen.py',
            target='a2module.cc',
            command='${PYTHON} ${SRC[0]} > ${TGT[0]}')

        obj = bld(features=['cxx', 'cxxshlib', 'pyext'])
        obj.source = [
            'a.cc',
            'a2module.cc'
            ]
        obj.target = 'a2'
        obj.install_path = None # do not install
        obj.includes = '.'