File: SConstruct

package info (click to toggle)
opendrop 3.3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,940 kB
  • sloc: python: 18,944; cpp: 1,031; makefile: 25; sh: 7
file content (72 lines) | stat: -rw-r--r-- 1,615 bytes parent folder | download | duplicates (2)
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
61
62
63
64
65
66
67
68
69
70
71
72
import os
import shlex


env = Environment(
    NAME='opendrop',

    PACKAGE_METADATA = {
        'Requires-Python': '>=3.6',
        'Provides-Extra': 'genicam',
        'Requires-Dist': File('requirements.txt').get_text_contents().splitlines(),
        'Home-page': 'https://github.com/jdber1/opendrop',
        'Classifier': [
            'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
        ],
    },

    BUILDDIR='./build',
)


AddOption(
    '--build-dir',
    dest='build_dir',
    default=env.Dir('build'),
    metavar='DIR',
    help='Set DIR as the build directory.',
)


env['BUILDDIR'] = GetOption('build_dir')

env['CXX'] = 'mpicxx'

env.Append(
    ENV={
        'PATH': os.environ['PATH'],
        'HOME': os.environ['HOME'],
    },
    CPPPATH=[env.Dir('include')],
    CCFLAGS=[
        '-O3',
        '-std=c++14',
        shlex.split(os.environ.get('CPPFLAGS', '')),
        shlex.split(os.environ.get('CXXFLAGS', '')),
        shlex.split(os.environ.get('LDFLAGS', '')),
    ],
    LINKFLAGS=[
        shlex.split(os.environ.get('LDFLAGS', '')),
    ],
    VERSION=os.environ.get('DEB_VERSION_UPSTREAM', '0.0.0'),
)

env.Tool('python')
env.Tool('pydist')


package_files = SConscript('opendrop/SConscript', exports='env')
wheel = env.WheelPackage(
    '$BUILDDIR',
    package_files,
    packages={'opendrop': './opendrop'},

    python_tag='cp%s%s' % tuple(env['PYTHONVERSION'].split('.')[:2]),
    abi_tag='abi3',
    platform_tag=env['PYTHONPLATFORM'],
)
Alias('bdist_wheel', wheel)


c_tests = SConscript('tests/c/SConscript', exports='env')
Alias('tests', c_tests)