Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure wheel is installed before import #509

Merged
merged 1 commit into from
May 31, 2023
Merged

Conversation

radarhere
Copy link
Collaborator

@radarhere radarhere commented May 31, 2023

install_wheel calls supported_wheels.py

multibuild/common_utils.sh

Lines 447 to 448 in 07f10c3

$PIP_CMD install packaging
local supported_wheels=$($PYTHON_EXE $MULTIBUILD_DIR/supported_wheels.py $wheelhouse/*.whl)

and supported_wheels.py imports wheel
try:
from wheel.install import WHEEL_INFO_RE as wheel_matcher
except ImportError: # As of Wheel 0.32.0
from wheel.wheelfile import WHEEL_INFO_RE
wheel_matcher = WHEEL_INFO_RE.match

However, in Python 3.12 I get

  Traceback (most recent call last):
    File "/io/multibuild/supported_wheels.py", line 12, in <module>
      from wheel.install import WHEEL_INFO_RE as wheel_matcher
  ModuleNotFoundError: No module named 'wheel'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/io/multibuild/supported_wheels.py", line 14, in <module>
      from wheel.wheelfile import WHEEL_INFO_RE
  ModuleNotFoundError: No module named 'wheel'

I expect this is related to https://docs.python.org/3.12/whatsnew/3.12.html#removed

This PR adds wheel to that earliest install command.

@mattip mattip merged commit 3821310 into multi-build:devel May 31, 2023
@mattip
Copy link
Collaborator

mattip commented May 31, 2023

Thanks @radarhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants