# HG changeset patch # User Franz Glasner # Date 1760195783 -7200 # Node ID 0a8b06e38e193244cd39084bb160d62563713ba5 # Parent 202a1f38a622c1582f00928013b5cad1651e638f Need "packaging" at wheel build time too. Parsing of version_p into a tuple now is done at build time. diff -r 202a1f38a622 -r 0a8b06e38e19 setup.py --- a/setup.py Sat Oct 11 17:15:08 2025 +0200 +++ b/setup.py Sat Oct 11 17:16:23 2025 +0200 @@ -773,7 +773,8 @@ except Exception: return 0 swig_version_tuple = tuple(int_or_0(i) for i in swig_version.split('.')) - version_p_tuple = tuple(int_or_0(i) for i in version_p.split('.')) + import packaging.version + version_p_tuple = packaging.version.Version(version_p).release log(f'{swig_version=}') text = '' if os.path.isdir(mupdf_location): @@ -1473,6 +1474,11 @@ print(f'OpenBSD: pip install of swig does not build; assuming `pkg_add swig`.') else: ret.append( 'swig') + # + # Needed extension version parsing with a local version part. + # Our FreeBSD build has a local version. + # + ret.append('packaging') return ret