diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2022-07-13 17:59:52 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2022-07-13 17:59:52 -0400 |
commit | 1845a34d7151718ee65bbb6e392b41bf404e1bc4 (patch) | |
tree | cdec2a64a0fafb11b8121dac59964e30652542a0 | |
parent | 152c13de811b302dcc673f6ed4c595cd29fd671d (diff) | |
download | python-setuptools-git-1845a34d7151718ee65bbb6e392b41bf404e1bc4.tar.gz |
Disable framework_compat except for Homebrew builds. Fixes pypa/distutils#158.
-rw-r--r-- | distutils/command/_framework_compat.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/distutils/command/_framework_compat.py b/distutils/command/_framework_compat.py index e032603a..cffa27cb 100644 --- a/distutils/command/_framework_compat.py +++ b/distutils/command/_framework_compat.py @@ -7,18 +7,21 @@ import sys import os import functools import subprocess +import sysconfig @functools.lru_cache() def enabled(): """ - Only enabled for Python 3.9 framework builds except ensurepip and venv. + Only enabled for Python 3.9 framework homebrew builds + except ensurepip and venv. """ PY39 = (3, 9) < sys.version_info < (3, 10) framework = sys.platform == 'darwin' and sys._framework + homebrew = "Cellar" in sysconfig.get_config_var('projectbase') venv = sys.prefix != sys.base_prefix ensurepip = os.environ.get("ENSUREPIP_OPTIONS") - return PY39 and framework and not venv and not ensurepip + return PY39 and framework and homebrew and not venv and not ensurepip schemes = dict( |