From 7002e2c71e501d829f52ea7202eae030e30386aa Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 29 Oct 2025 13:02:17 -0700 Subject: [PATCH] setup.py: use swig -version instead of swig --version `swig --version` doesn't seem to be supported in all versions of swig, e.g., FreeBSD and some flavors of Linux. Use `swig -version` instead when querying the CLI tool version. Closes: #4756 Signed-off-by: Enji Cooper --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 43fc16431..2536feb8f 100755 --- a/setup.py +++ b/setup.py @@ -726,7 +726,7 @@ def add(flavour, from_, to_): log(f'Failed to get git information: {e}') sha, comment, diff, branch = (None, None, None, None) swig = PYMUPDF_SETUP_SWIG or 'swig' - swig_version_text = run(f'{swig} --version', capture=1) + swig_version_text = run(f'{swig} -version', capture=1) m = re.search('\nSWIG Version ([^\n]+)', swig_version_text) log(f'{swig_version_text=}') assert m, f'Unrecognised {swig_version_text=}'