Skip to content

Commit 76f87d5

Browse files
Fix error caused by missing normalization when comparing distlib and setuptools
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
1 parent 8e04b41 commit 76f87d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rez/utils/pip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ def safe_name(name: str) -> str:
536536
537537
Any runs of non-alphanumeric/. characters are replaced with a single '-'.
538538
"""
539-
return re.sub('[^A-Za-z0-9.]+', '-', name)
539+
return re.sub('[^A-Za-z0-9.]+', '-', name).lower()
540540

541541
class DirectPathScanner(DistributionFinder):
542542
@classmethod
@@ -560,7 +560,7 @@ def find_distributions(cls, context=DistributionFinder.Context()):
560560
else:
561561
name = setuptools_dist.name
562562

563-
if name == safe_name(installed_dist.key):
563+
if safe_name(name) == safe_name(installed_dist.key):
564564
return setuptools_dist
565565

566566
return None

0 commit comments

Comments
 (0)