You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
swig --version doesn't work in all versions of swig; -version should be used instead #4756
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
We’re running into the same deprecation warnings on Python 3.12:
DeprecationWarning: builtin type SwigPyPacked has no module attribute
DeprecationWarning: builtin type SwigPyObject has no module attribute
DeprecationWarning: builtin type swigvarlink has no module attribute
They show up as soon as we import fitz, both in our unit tests and in a container image we ship. Right now we’re silencing them via filterwarnings, but just wanted to +1 that the problem affects us too. Happy to retest when a fix lands.
Activity
Arthur-Barreto commentedon Oct 29, 2025
We’re running into the same deprecation warnings on Python 3.12:
DeprecationWarning: builtin type SwigPyPacked has no module attribute
DeprecationWarning: builtin type SwigPyObject has no module attribute
DeprecationWarning: builtin type swigvarlink has no module attribute
They show up as soon as we import fitz, both in our unit tests and in a container image we ship. Right now we’re silencing them via filterwarnings, but just wanted to +1 that the problem affects us too. Happy to retest when a fix lands.
setup.py: use swig -version instead of swig --version
julian-smith-artifex-com commentedon Oct 30, 2025
We keep issues open until they are fixed in a release, so reopening.
ngie-eign commentedon Oct 31, 2025
Sounds good - thanks!
julian-smith-artifex-com commentedon Nov 5, 2025
Fixed in pymupdf-1.26.6.