Skip to content

Commit a5ded57

Browse files
committed
Set project name to UNKNOWN when empty
For compatibility with distutils
1 parent 75ba96c commit a5ded57

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

news/9838.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix compatibility between distutils and sysconfig when the project name is unknown.

src/pip/_internal/locations/_sysconfig.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ def get_scheme(
136136
python_xy = f"python{get_major_minor_version()}"
137137
paths["include"] = os.path.join(base, "include", "site", python_xy)
138138

139+
if dist_name is None:
140+
dist_name = "UNKNOWN"
141+
139142
scheme = Scheme(
140143
platlib=paths["platlib"],
141144
purelib=paths["purelib"],

0 commit comments

Comments
 (0)