>>> Compiling source in /tmp/portage/dev-python/pyocr-0.8.3/work/pyocr-0.8.3 ... * python3_10: running distutils-r1_run_phase distutils-r1_python_compile * Building the wheel for pyocr-0.8.3 via setuptools.build_meta:__legacy__ gpep517 build-wheel --backend setuptools.build_meta:__legacy__ --output-fd 3 --wheel-dir /tmp/portage/dev-python/pyocr-0.8.3/work/pyocr-0.8.3-python3_10/wheel 2023-02-25 14:27:46,814 gpep517 INFO Building wheel via backend setuptools.build_meta:__legacy__ Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/setuptools/_normalization.py", line 62, in safe_version return str(packaging.version.Version(v)) File "/usr/lib/python3.10/site-packages/packaging/version.py", line 197, in __init__ raise InvalidVersion(f"Invalid version: '{version}'") packaging.version.InvalidVersion: Invalid version: 'None' During handling of the above exception, another exception occurred: [...]
Created attachment 854602 [details] build.log
So apparently the problem is that setup.py is passing: version=version to setup(). In the setuptools_scm code branch, this resolves to: version=None If I remove that line, everything seems to work fine. I suspect either setuptools or setuptools_scm changed something and now version must not be passed at all when using SCM version. The easy workaround is `/version=version/d`. Upstream could probably achieve something similar to the current behavior by passing `version` override **kwargs style.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bda2d1aa7515f101dcdde4f37a8807889e7142b8 commit bda2d1aa7515f101dcdde4f37a8807889e7142b8 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2023-02-26 15:20:03 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2023-02-26 15:25:11 +0000 dev-python/pyocr: Fix version-related build failure Closes: https://bugs.gentoo.org/897690 Signed-off-by: Michał Górny <mgorny@gentoo.org> dev-python/pyocr/pyocr-0.8.3.ebuild | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Thanks for the fix! And nice to see it merged upstream already too