Skip to content

Commit

Permalink
Better explanatory comment
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Apr 25, 2021
1 parent e7b1722 commit 2a009a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pip/_internal/locations/_sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ def get_scheme(

paths = sysconfig.get_paths(scheme=scheme_name, vars=variables)

# Pip historically uses a special header path in virtual environments.
# Logic here is very arbitrary, we're doing it for compatibility, don't ask.
# 1. Pip historically uses a special header path in virtual environments.
# 2. If the distribution name is not known, distutils uses 'UNKNOWN'. We
# only do the same when not running in a virtual environment because
# pip's historical header path logic (see point 1) did not do this.
if running_under_virtualenv():
if user:
base = variables.get("userbase", sys.prefix)
Expand Down

0 comments on commit 2a009a0

Please sign in to comment.