Skip to content

Commit

Permalink
version: dump library loader info
Browse files Browse the repository at this point in the history
perhaps we'd only need the libpath (or at least not the libname), but
dump the whole thing for now
  • Loading branch information
mara004 committed Nov 13, 2023
1 parent 00e7c3e commit c5d1885
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pypdfium2/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import pypdfium2._helpers as pdfium
import pypdfium2.internal as pdfium_i
from pypdfium2.version import PYPDFIUM_INFO, PDFIUM_INFO
# the * import in pypdfium2.raw loses underscore-prefixed members, so import from the direct origin
from pypdfium2_raw.bindings import _loader_info as loader_info

SubCommands = {
"arrange": "rearrange/merge documents",
Expand Down Expand Up @@ -36,7 +38,9 @@ def get_parser():
main_parser.add_argument(
"--version", "-v",
action = "version",
version = f"pypdfium2 {PYPDFIUM_INFO}\npdfium {PDFIUM_INFO}",
version = \
f"pypdfium2 {PYPDFIUM_INFO}\n" + f"pdfium {PDFIUM_INFO}\n" + \
"\n".join([f" {k}: {v!r}" for k, v in loader_info.items()]),
)
subparsers = main_parser.add_subparsers(dest="subcommand")

Expand Down

0 comments on commit c5d1885

Please sign in to comment.