Skip to content

Commit

Permalink
Set project name to UNKNOWN when empty
Browse files Browse the repository at this point in the history
For compatibility with distutils
  • Loading branch information
uranusjr committed Apr 24, 2021
1 parent 75ba96c commit a5ded57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/9838.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix compatibility between distutils and sysconfig when the project name is unknown.
3 changes: 3 additions & 0 deletions src/pip/_internal/locations/_sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def get_scheme(
python_xy = f"python{get_major_minor_version()}"
paths["include"] = os.path.join(base, "include", "site", python_xy)

if dist_name is None:
dist_name = "UNKNOWN"

scheme = Scheme(
platlib=paths["platlib"],
purelib=paths["purelib"],
Expand Down

0 comments on commit a5ded57

Please sign in to comment.