MCPcopy Index your code
hub / github.com/secdev/scapy / get_long_description

Function get_long_description

setup.py:22–38  ·  view source on GitHub ↗

Extract description from README.md, for PyPI's usage

()

Source from the content-addressed store, hash-verified

20
21
22def get_long_description():
23 """
24 Extract description from README.md, for PyPI's usage
25 """
26 def process_ignore_tags(buffer):
27 return "\n".join(
28 x for x in buffer.split("\n") if "<!-- ignore_ppi -->" not in x
29 )
30 try:
31 fpath = os.path.join(os.path.dirname(__file__), "README.md")
32 with io.open(fpath, encoding="utf-8") as f:
33 readme = f.read()
34 desc = readme.partition("<!-- start_ppi_description -->")[2]
35 desc = desc.partition("<!-- stop_ppi_description -->")[0]
36 return process_ignore_tags(desc.strip())
37 except IOError:
38 return None
39
40
41# Note: why do we bother including a 'scapy/VERSION' file and doing our

Callers 1

setup.pyFile · 0.85

Calls 4

process_ignore_tagsFunction · 0.85
joinMethod · 0.80
openMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected