Project

Profile

Help

Bug #6509

open

Python-related Gradle tasks failing with python error

Added by Matt Patterson 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Low
Category:
Build and release
Sprint/Milestone:
-
Start date:
2024-08-14
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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
Actions #1

Updated by Matt Patterson 2 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

Also available in: Atom PDF