File: SConstruct

package info (click to toggle)
scons 4.4.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,476 kB
  • sloc: xml: 199,987; python: 133,450; javascript: 4,671; sh: 1,007; perl: 493; ruby: 229; ansic: 180; java: 139; makefile: 134; f90: 108; cpp: 71; yacc: 39; lex: 10
file content (16 lines) | stat: -rw-r--r-- 666 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import sys

env = Environment(tools=['python'])

# Copy each file individually instead of copying the dir. This has the benefit
# of establishing nodes in-memory for each of the resulting files, which helps
# the scanner work correctly.
srcDir = env.Dir('to_be_copied')
for srcNode in srcDir.glob('*'):
    for destDir in [env.Dir('package1'), env.Dir('package2')]:
        env.Command(destDir.File(srcNode.name), srcNode,
                    Copy('$TARGET', '$SOURCE'))

# Don't set a dependency on the copy actions on purpose. Scanner should find
# the dependencies automatically.
env.Command('a.out', 'script.py', '$PYTHON $SOURCE $TARGET', PYTHON=sys.executable)