def action(stage_dir, root, path): command = [ sys.executable, os.path.join("..", "..", "bin", "nuitka"), "--module", "--output-dir", stage_dir, "--remove-output", "--plugin-enable=pylint-warnings" ] command += os.environ.get("NUITKA_EXTRA_OPTIONS", "").split() command.append(path) try: subprocess.check_call(command) except subprocess.CalledProcessError: my_print("Falling back to full comparison due to error exit.") checkCompilesNotWithCPython( dirname=None, filename=path, search_mode=search_mode, ) else: my_print("OK") if os.name == "nt": suffix = "pyd" else: suffix = "so" target_filename = os.path.basename(path).replace(".py", '.' + suffix) target_filename = target_filename.replace('(', "").replace(')', "") os.unlink(os.path.join(stage_dir, target_filename))
def action(stage_dir, _root, path): command = [ sys.executable, os.path.join("..", "..", "bin", "nuitka"), "--module", "--output-dir", stage_dir, "--remove-output", "--plugin-enable=pylint-warnings", ] command += os.environ.get("NUITKA_EXTRA_OPTIONS", "").split() command.append(path) try: subprocess.check_call(command) except subprocess.CalledProcessError: if os.path.basename(path) in nosyntax_errors: my_print("Syntax error is known unreliable with file file.") else: my_print("Falling back to full comparison due to error exit.") checkCompilesNotWithCPython(dirname=None, filename=path, search_mode=search_mode) else: my_print("OK") suffix = getSharedLibrarySuffix(preferred=True) target_filename = os.path.basename(path)[:-3] + suffix target_filename = target_filename.replace("(", "").replace(")", "") os.unlink(os.path.join(stage_dir, target_filename))