← All tasks
pythonpymupdf/pymupdf #4756Not a task: not reproduced

swig --version doesn't work in all versions of swig; -version should be used instead

envgap__pymupdf__pymupdf-4756

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
23de71837cc944b4421487628e29c2e1e06a7547
Manifest
setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

pymupdf/pymupdf #4756 · read the original issue
Did code inspection and it looks like `setup.py` relies on `swig --version` returning something meaningful (see the linked code below).

`--version` isn't implemented on all versions of swig (it seems that it's only technically implemented on the MacOS version of the package).

### FreeBSD
```
% swig --version
Unable to find option or file '--version', Use 'swig -help' for more information.
% swig -version 

SWIG Version 4.2.1

Compiled with c++ [amd64-portbld-freebsd14.3]

Configured options: +pcre

Please see https://www.swig.org for reporting bugs and further information
```

### Linux
```
% lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
% swig --version
Unable to find option or file '--version', Use 'swig -help' for more information.
% swig -version 

SWIG Version 4.1.0

Compiled with g++ [arm-unknown-linux-gnueabihf]

Configured options: +pcre

Please see https://www.swig.org for reporting bugs and further information
```

### macOS
```
% swig --version

SWIG Version 4.3.1

Compiled with clang++ [aarch64-apple-darwin24.2.0]

Configured options: +pcre

Please see https://www.swig.org for reporting bugs and further information
```

https://github.com/pymupdf/PyMuPDF/blob/5b6acfb369fb4c460ffeb5f2288d6efe81b93c93/setup.py#L729
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]