Skip to content

Commit 0bf4381

Browse files
committed
2 parents 8b675a1 + 1845a34 commit 0bf4381

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setuptools/_distutils/command/_framework_compat.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@
77
import os
88
import functools
99
import subprocess
10+
import sysconfig
1011

1112

1213
@functools.lru_cache()
1314
def enabled():
1415
"""
15-
Only enabled for Python 3.9 framework builds except ensurepip and venv.
16+
Only enabled for Python 3.9 framework homebrew builds
17+
except ensurepip and venv.
1618
"""
1719
PY39 = (3, 9) < sys.version_info < (3, 10)
1820
framework = sys.platform == 'darwin' and sys._framework
21+
homebrew = "Cellar" in sysconfig.get_config_var('projectbase')
1922
venv = sys.prefix != sys.base_prefix
2023
ensurepip = os.environ.get("ENSUREPIP_OPTIONS")
21-
return PY39 and framework and not venv and not ensurepip
24+
return PY39 and framework and homebrew and not venv and not ensurepip
2225

2326

2427
schemes = dict(

0 commit comments

Comments
 (0)