MCPcopy Index your code
hub / github.com/python/cpython / _read_files_egginfo_sources

Method _read_files_egginfo_sources

Lib/importlib/metadata/__init__.py:661–674  ·  view source on GitHub ↗

Read SOURCES.txt and return lines in a similar CSV-parsable format as RECORD: each file name must be quoted (since it might contain literal commas). Note that SOURCES.txt is not a reliable source for what files are installed by a package. This file is genera

(self)

Source from the content-addressed store, hash-verified

659 return map('"{}"'.format, paths)
660
661 def _read_files_egginfo_sources(self):
662 """
663 Read SOURCES.txt and return lines in a similar CSV-parsable
664 format as RECORD: each file name must be quoted (since it
665 might contain literal commas).
666
667 Note that SOURCES.txt is not a reliable source for what
668 files are installed by a package. This file is generated
669 for a source archive, and the files that are present
670 there (e.g. setup.py) may not correctly reflect the files
671 that are present after the package has been installed.
672 """
673 text = self.read_text('SOURCES.txt')
674 return text and map('"{}"'.format, text.splitlines())
675
676 @property
677 def requires(self) -> list[str] | None:

Callers 1

filesMethod · 0.95

Calls 2

read_textMethod · 0.95
splitlinesMethod · 0.45

Tested by

no test coverage detected