From e80e4dde3cb69096b2dd24e8bdf1d98c115cb77f Mon Sep 17 00:00:00 2001 From: Daniel Hershcovich Date: Mon, 6 Nov 2017 15:53:10 +0200 Subject: [PATCH] Remove table of contents when converting README to rst for PyPI PyPI does not support internal document links (starting with #). https://stackoverflow.com/a/16594755/223267 --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 241b7fd2c..0600e7bff 100644 --- a/setup.py +++ b/setup.py @@ -339,6 +339,7 @@ def run(self): try: import pypandoc long_description = pypandoc.convert("README.md", "rst") + long_description = "\n".join(line for line in long_description.splitlines() if "<#" not in line) except: long_description = ""