show readme as pypi description

This commit is contained in:
Jordan Terry
2022-06-01 00:24:11 -04:00
committed by GitHub
parent 0e99e3c624
commit 6b1e30dd4a

View File

@@ -42,6 +42,18 @@ extras["all"] = list(
itertools.chain.from_iterable(map(lambda group: extras[group], all_groups))
)
# Uses the readme as the description on PyPI
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
setup(
name="gym",
version=VERSION,
@@ -52,6 +64,8 @@ setup(
license="MIT",
packages=[package for package in find_packages() if package.startswith("gym")],
zip_safe=False,
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=[
"numpy>=1.18.0",
"cloudpickle>=1.2.0",