Extract description from README.md, for PyPI's usage
()
| 20 | |
| 21 | |
| 22 | def 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 |
no test coverage detected