Use Path in setup.py get_long_description()

This commit is contained in:
Chris Mayo 2021-12-30 19:27:04 +00:00
parent 2f40fe8415
commit 6af59ec37e

View file

@ -55,8 +55,7 @@ RELEASE_DATE_FILE = "_release_date"
def get_long_description():
"""Try to read long description from README.rst."""
try:
with open("README.rst") as f:
return f.read()
return Path("README.rst").read_text()
except Exception:
return Description