diff --git a/README.rst b/README.rst index e6d718a8..cebe7f15 100644 --- a/README.rst +++ b/README.rst @@ -13,6 +13,8 @@ Pymagicc .. sec-begin-index +.. sec-begin-long-description + Pymagicc is a Python wrapper around the reduced complexity climate model `MAGICC6 `_. It wraps the CC-BY-NC-SA licensed `MAGICC6 binary `_. Pymagicc itself is AGPL licensed. @@ -27,6 +29,8 @@ In climate research it can, for example, be used in the analysis of mitigation s See `www.magicc.org `_ and `Meinshausen et al. 2011 `_ for further information. +.. sec-end-long-description + .. sec-end-index Basic Usage diff --git a/setup.py b/setup.py index c4523708..0663bfbd 100644 --- a/setup.py +++ b/setup.py @@ -109,7 +109,15 @@ } with open(README, "r", encoding="utf-8") as f: - README_TEXT = f.read() + README_LINES = ["Pymagicc", "========", ""] + add_line = False + for line in f: + if line.strip() == ".. sec-begin-long-description": + add_line = True + elif line.strip() == ".. sec-end-long-description": + break + elif add_line: + README_LINES.append(line) class PyTest(TestCommand): @@ -131,7 +139,7 @@ def run_tests(self): name=PACKAGE_NAME, version=versioneer.get_version(), description=DESCRIPTION, - long_description=README_TEXT, + long_description="\n".join(README_LINES), long_description_content_type="text/x-rst", author=", ".join([author[0] for author in AUTHORS]), author_email=", ".join([author[1] for author in AUTHORS]),