brintos

brintos / llvm-project-archived public Read only

0
0
Text · 460 B · 2cdf3e7 Raw
23 lines · plain
1import os2import subprocess3 4 5def have_needed_dot_support():6    if not os.path.exists("/usr/bin/dot"):7        return False8 9    try:10        ld_cmd = subprocess.Popen(11            ["/usr/bin/dot", "-T?"], stdout=subprocess.PIPE, stderr=subprocess.PIPE12        )13        ld_err = ld_cmd.stderr.read().decode()14        ld_cmd.wait()15    except:16        return False17 18    return "pdf" in ld_err19 20 21if not have_needed_dot_support():22    config.unsupported = True23