From 0ececeeb8da7dbac225fd8531298589dbf569b3b Mon Sep 17 00:00:00 2001 From: Jet <38184875+jjshoots@users.noreply.github.com> Date: Fri, 6 Jan 2023 22:11:11 +0000 Subject: [PATCH] Add back long description to setup (#243) --- setup.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9ff42fca5..4b1809efe 100644 --- a/setup.py +++ b/setup.py @@ -19,4 +19,19 @@ def get_version(): raise RuntimeError("bad version data in __init__.py") -setup(name="gymnasium", version=get_version()) +def get_description(): + """Gets the description from the readme.""" + with open("README.md") as fh: + long_description = "" + header_count = 0 + for line in fh: + if line.startswith("##"): + header_count += 1 + if header_count < 2: + long_description += line + else: + break + return long_description + + +setup(name="gymnasium", version=get_version(), long_description=get_description())