source: rtems-docs/posix-compliance/wscript @ 5d8b0dd

Last change on this file since 5d8b0dd was 5d8b0dd, checked in by Chris Johns <chrisj@…>, on Feb 12, 2019 at 11:18:43 PM

waf: Remove as many sys path hacks as we can.

There are still sys.path hacks in the files. They cannot
be removed because the instance of python running the sphinx-build
command does not see our top level path hacks. I looked at using
PYTHONPATH but I could not figure out how to set a process environ
var for a waf build instance.

  • Property mode set to 100644
File size: 1.0 KB
1from common.waf import cmd_configure as configure
2from common.waf import cmd_build as doc_build
3from common.waf import cmd_options as options
4from common.waf import spell
5from common.waf import cmd_spell
6from common.waf import linkcheck
7from common.waf import cmd_linkcheck
9import posix_rst
11def gen_posix_rst(task):
12    c = posix_rst.compliance()
13    c.load(task.inputs[1].abspath())
14    s = ['']
15    for standard in posix_rst.standards:
16        s += ['.. comment SPDX-License-Identifier: CC-BY-SA-4.0',
17              '',
18              posix_rst.standard_names[standard],
19              '*' * len(posix_rst.standard_names[standard]),
20               ''] + c.output(standard)
21    with open(task.outputs[0].abspath(), 'w') as w:
22        from os import linesep
23        w.write(linesep.join(s))
25def build(ctx):
26    ctx(rule = gen_posix_rst,
27        source = ['', 'RTEMS-Standards-Compliance-v4a.csv'],
28        target = 'generated-posix-compliance.rst')
29    doc_build(ctx, extra_source = ['generated-posix-compliance.rst'])
Note: See TracBrowser for help on using the repository browser.