@@ -1256,7 +1256,7 @@ def update_pth(self, dist): # noqa: C901 # is too complex (11) # FIXME
1256
1256
1257
1257
log .info ("Removing %s from easy-install.pth file" , d )
1258
1258
self .pth_file .remove (d )
1259
- if d_location in self .shadow_path :
1259
+ if d_location in map ( normalize_path , self .shadow_path ) :
1260
1260
self .shadow_path .remove (d_location )
1261
1261
1262
1262
if not self .multi_version :
@@ -1268,7 +1268,7 @@ def update_pth(self, dist): # noqa: C901 # is too complex (11) # FIXME
1268
1268
else :
1269
1269
log .info ("Adding %s to easy-install.pth file" , dist )
1270
1270
self .pth_file .add (dist ) # add new entry
1271
- if dist_location not in self .shadow_path :
1271
+ if dist_location not in map ( normalize_path , self .shadow_path ) :
1272
1272
self .shadow_path .append (dist_location )
1273
1273
1274
1274
if self .dry_run :
@@ -1717,8 +1717,8 @@ def _wrap_lines(lines):
1717
1717
def add (self , dist ):
1718
1718
"""Add `dist` to the distribution map"""
1719
1719
dist_location = normalize_path (dist .location )
1720
- new_path = dist_location not in self .paths and (
1721
- dist_location not in self .sitedirs
1720
+ new_path = dist_location not in map ( normalize_path , self .paths ) and (
1721
+ dist_location not in map ( normalize_path , self .sitedirs )
1722
1722
or
1723
1723
# account for '.' being in PYTHONPATH
1724
1724
dist_location == normalize_path (os .getcwd ())
@@ -1731,7 +1731,7 @@ def add(self, dist):
1731
1731
def remove (self , dist ):
1732
1732
"""Remove `dist` from the distribution map"""
1733
1733
dist_location = normalize_path (dist .location )
1734
- while dist_location in self .paths :
1734
+ while dist_location in map ( normalize_path , self .paths ) :
1735
1735
self .paths .remove (dist_location )
1736
1736
self .dirty = True
1737
1737
super ().remove (dist )
0 commit comments