Bug #6509
openPython-related Gradle tasks failing with python error
0%
Description
gradle tasks that touch python-related parts of the build started failing with this message:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':eec_python_build_wheel'.
> Failed to query the value of task ':eec_python_build_wheel' property 'wheelSuffix'.
> Process 'command '/Users/matt/Documents/work/saxonica/saxondev/build/pyvenv/python-wheel-vendored-deprecation-problem/bin/python'' finished with non-zero exit value 1
Updated by Matt Patterson 4 months ago
- Applies to branch 12, trunk added
Looking back in the Gradle output I saw this:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name 'get_platform' from 'wheel.bdist_wheel' (/Users/matt/Documents/work/saxonica/saxondev/build/pyvenv/python-wheel-vendored-deprecation-problem/lib/python3.12/site-packages/wheel/bdist_wheel.py)
After realising that it still worked on my machine, I checked the versions of wheel
and realised that I still had 0.4.3 installed, while O'Neil had 0.4.4, which was released last week,
I could reproduce the failure when I updated (creating a new Venv causes the most recent version to get installed). Reading the changelog I could see that the vendoring of the bdist_wheel
command from setuptools
has been deprecated, and this is causing the error. The solution is to ensure we're pulling a recent enough version of setuptools
that the bdist_wheel
command is there, and import get_platform
from there...
Please register to edit this issue