File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -497,14 +497,16 @@ def normalize(name):
497497 """
498498 return re .sub (r"[-_.]+" , "-" , name ).lower ().replace ('-' , '_' )
499499
500- def matches (self , name , base ):
501- n_low = name .lower ()
500+ def matches (self , cand , base ):
501+ low = cand .lower ()
502+ pre , ext = os .path .splitext (low )
503+ name , sep , rest = pre .partition ('-' )
502504 return (
503- n_low in self .exact_matches
504- or n_low .replace ('.' , '_' ).startswith (self .prefix )
505- and n_low . endswith ( self .suffixes )
505+ low in self .exact_matches
506+ or name .replace ('.' , '_' ).startswith (self .normalized )
507+ and ext in self .suffixes
506508 # legacy case:
507- or self .is_egg (base ) and n_low == 'egg-info'
509+ or self .is_egg (base ) and low == 'egg-info'
508510 )
509511
510512 def is_egg (self , base ):
You can’t perform that action at this time.
0 commit comments