if not "DirectX" in config.root.targets: config.unsupported = True # Insert at 0 to prevent '%p' from being substituted with test directory in '%python'. config.substitutions.insert( 0, ( "%md5sum", '%python -c "import sys,hashlib; ' "p=sys.argv[1]; " "h=hashlib.md5(open(p,'rb').read()).hexdigest(); " 'print(h)"', ), )