Browse Source

add back long description (#297)

Jet 2 năm trước cách đây
mục cha
commit
b409e23e8a
1 tập tin đã thay đổi với 16 bổ sung1 xóa
  1. 16 1
      setup.py

+ 16 - 1
setup.py

@@ -20,4 +20,19 @@ def get_version():
     raise RuntimeError("bad version data in __init__.py")
 
 
-setup(name="minigrid", 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="minigrid", version=get_version(), long_description=get_description())