Closed shubhbapna closed 5 hours ago
@tiran using wheel.wheelfile.WheelFile(wheel_filename)
doesn't work. It throws an error says wheelfile is not an attribute of wheel
You have to import the submodule:
>>> import wheel
>>> wheel.wheelfile.WheelFile
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'wheel' has no attribute 'wheelfile'
>>> import wheel.wheelfile
>>> wheel.wheelfile.WheelFile
<class 'wheel.wheelfile.WheelFile'>
In _download_wheel_check we currently just check whether the wheel file is a valid zip file. Lets instead check if it is a valid wheel file by using the
wheel.wheelfile.WheelFile
API as mentioned in https://github.com/python-wheel-build/fromager/issues/507#issuecomment-2492133631