diff --git a/setupsrc/pypdfium2_setup/emplace.py b/setupsrc/pypdfium2_setup/emplace.py index 39d008402..5d3d60b3b 100644 --- a/setupsrc/pypdfium2_setup/emplace.py +++ b/setupsrc/pypdfium2_setup/emplace.py @@ -32,11 +32,12 @@ def _get_pdfium_with_cache(pl_name, req_ver, req_flags, use_v8): else: update_binary = True - if update_binary: # TODO better repr - print(f"Updating to {req_ver} {req_flags}", file=sys.stderr) + if update_binary: + flags_repr = ":{%s}" % ",".join(req_flags) if req_flags else "" + print(f"Downloading binary {req_ver}{flags_repr} ...", file=sys.stderr) update_pdfium.main([pl_name], version=req_ver, use_v8=use_v8) else: - print("Using cache") + print("Using cached binary") # build_pdfium_bindings() has its own cache logic, so always call to ensure bindings match compile_lds = [DataDir/Host.platform] if pl_name == Host.platform else [] diff --git a/setupsrc/pypdfium2_setup/packaging_base.py b/setupsrc/pypdfium2_setup/packaging_base.py index 137143b43..1dc527ce3 100644 --- a/setupsrc/pypdfium2_setup/packaging_base.py +++ b/setupsrc/pypdfium2_setup/packaging_base.py @@ -433,9 +433,11 @@ def build_pdfium_bindings(version, headers_dir=None, flags=[], run_lds=["."], ** if bind_path.exists() and ver_path.exists(): prev_info = read_json(ver_path) if prev_info == curr_info: + print(f"Using cached bindings", file=sys.stderr) return else: - print(f"{prev_info} != {curr_info}") + print(f"Rebuilding bindings ...", file=sys.stderr) + # print(f"{prev_info} != {curr_info}", file=sys.stderr) if not headers_dir.exists() or not list(headers_dir.glob("fpdf*.h")): print("Downloading headers ...", file=sys.stderr)