summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setuptools/_distutils/command/_framework_compat.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/setuptools/_distutils/command/_framework_compat.py b/setuptools/_distutils/command/_framework_compat.py
index e032603a..cffa27cb 100644
--- a/setuptools/_distutils/command/_framework_compat.py
+++ b/setuptools/_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(