File: makemodules.py

package info (click to toggle)
pypy3 7.0.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 111,848 kB
  • sloc: python: 1,291,746; ansic: 74,281; asm: 5,187; cpp: 3,017; sh: 2,533; makefile: 544; xml: 243; lisp: 45; csh: 21; awk: 4
file content (27 lines) | stat: -rw-r--r-- 1,047 bytes parent folder | download | duplicates (9)
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
import py
from pypy.config import pypyoption
from rpython.config import translationoption, config

thisdir = py.path.local(__file__).dirpath()

if __name__ == '__main__':
    c = config.Config(pypyoption.pypy_optiondescription).usemodules
    prefix = "objspace.usemodules"
    thisdir.join(prefix + ".rst").ensure()
    for p in c.getpaths(include_groups=True):
        basename = prefix + "." + p + ".rst"
        f = thisdir.join(basename)
        #if f.check() and f.size():
        #    continue
        print "making docs for", p
        text = ["Use the '%s' module. " % (p, )]
        if p in pypyoption.essential_modules:
            text.append("This module is essential, included by default and should not be removed.")
        elif p in pypyoption.default_modules:
            text.append("This module is expected to be working and is included by default.")
        elif p in pypyoption.working_modules:
            text.append("This module is expected to be fully working.")
        text.append("")
        f.write("\n".join(text))