@@ -516,27 +516,29 @@ def _read_files_egginfo_installed(self):
516516 """
517517 Read installed-files.txt and return lines in a similar
518518 CSV-parsable format as RECORD: each file must be placed
519- relative to the site-packages directory, and must also be
519+ relative to the site-packages directory and must also be
520520 quoted (since file names can contain literal commas).
521521
522522 This file is written when the package is installed by pip,
523523 but it might not be written for other installation methods.
524- Hence, even if we can assume that this file is accurate
525- when it exists, we cannot assume that it always exists.
524+ Assume the file is accurate if it exists.
526525 """
527526 text = self .read_text ('installed-files.txt' )
528- # We need to prepend the .egg-info/ subdir to the lines in this file.
529- # But this subdir is only available in the PathDistribution's self._path
530- # which is not easily accessible from this base class.. .
527+ # Prepend the .egg-info/ subdir to the lines in this file.
528+ # But this subdir is only available from PathDistribution's
529+ # self._path .
531530 subdir = getattr (self , '_path' , None )
532531 if not text or not subdir :
533532 return
534- with contextlib .suppress (Exception ):
535- ret = [
536- str ((subdir / line ).resolve ().relative_to (self .locate_file ('' )))
537- for line in text .splitlines ()
538- ]
539- return map ('"{}"' .format , ret )
533+
534+ paths = (
535+ (subdir / name )
536+ .resolve ()
537+ .relative_to (self .locate_file ('' ).resolve ())
538+ .as_posix ()
539+ for name in text .splitlines ()
540+ )
541+ return map ('"{}"' .format , paths )
540542
541543 def _read_files_egginfo_sources (self ):
542544 """
0 commit comments