Skip to content

Commit

Permalink
fix import in setup.py if wheel package is not installed (#1223)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsavulescu committed Apr 28, 2021
1 parent f120189 commit 0466904
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,12 @@ def mac_osx_setenv():
"""Set MacOS environment to build high-compat wheels"""
try:
# Also ensure wheel package is avail
from wheel.macosx_libfile import extract_macosx_min_system_version
import wheel
except ImportError:
from setuptools.dist import Distribution
Distribution().fetch_build_eggs(["wheel"])

from wheel.macosx_libfile import extract_macosx_min_system_version

sdk_root = subprocess.check_output(['xcrun', '--sdk', 'macosx', '--show-sdk-path']
).decode().strip()
log.info("Setting SDKROOT=%s", sdk_root)
Expand Down

0 comments on commit 0466904

Please sign in to comment.