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 (40 lines) | stat: -rw-r--r-- 1,018 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
## -*- python -*-
#from waflib import Task

import sys
import os.path
import os
import subprocess

# uncomment to enable profiling information
# epydoc uses the profile data to generate call graphs
#os.environ["PYBINDGEN_ENABLE_PROFILING"] = ""

if 0:
    DEPRECATION_ERRORS = '-Werror::DeprecationWarning' # deprecations become errors
else:
    DEPRECATION_ERRORS = '-Wdefault::DeprecationWarning' # normal python behaviour


def build(bld):
    env = bld.env

    env['TOP_SRCDIR'] = bld.srcnode.abspath()

    bindgen = bld(
        features='command',
        source='barmodulegen.py',
        target='barmodule.cc',
        command='${PYTHON} %s ${SRC[0]} ${TOP_SRCDIR} > ${TGT[0]}' % (DEPRECATION_ERRORS,))

    if env['CXX'] and env['ENABLE_BOOST_SHARED_PTR'] == True:
        obj = bld(features='cxx cxxshlib pyext')
        obj.source = [
            'bar.cc',
            'barmodule.cc'
            ]
        obj.target = 'bar'
        obj.install_path = None
        obj.env.append_value("INCLUDES", '.')