Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 13, 2022
2 parents 8b675a1 + 1845a34 commit 0bf4381
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setuptools/_distutils/command/_framework_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@
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(
Expand Down

0 comments on commit 0bf4381

Please sign in to comment.