Skip to content

Commit

Permalink
Update README and setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
znicholls committed May 17, 2019
1 parent 5798fdc commit 4dbee64
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Pymagicc

.. sec-begin-index
.. sec-begin-long-description
Pymagicc is a Python wrapper around the reduced complexity climate model
`MAGICC6 <http://magicc.org/>`_. It wraps the CC-BY-NC-SA licensed
`MAGICC6 binary <http://www.magicc.org/download6>`_. Pymagicc itself is AGPL licensed.
Expand All @@ -27,6 +29,8 @@ In climate research it can, for example, be used in the analysis of mitigation s

See `www.magicc.org <http://www.magicc.org/>`_ and `Meinshausen et al. 2011 <https://doi.org/10.5194/acp-11-1417-2011>`_ for further information.

.. sec-end-long-description
.. sec-end-index
Basic Usage
Expand Down
12 changes: 10 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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]),
Expand Down

0 comments on commit 4dbee64

Please sign in to comment.