use README.md for the long description in setup.py

This commit is contained in:
Jack O'Connor 2021-08-23 13:04:33 -04:00
parent d631267e07
commit 4b64c8806c
1 changed files with 8 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import fastentrypoints
# https://packaging.python.org/en/latest/distributing.html # https://packaging.python.org/en/latest/distributing.html
project_root = os.path.dirname(__file__) project_root = os.path.dirname(__file__)
peru_sh_path = os.path.join(project_root, 'peru.sh') readme_file = os.path.join(project_root, 'README.md')
module_root = os.path.join(project_root, 'peru') module_root = os.path.join(project_root, 'peru')
version_file = os.path.join(module_root, 'VERSION') version_file = os.path.join(module_root, 'VERSION')
@ -40,6 +40,11 @@ def get_install_requires():
return dependencies return dependencies
def readme_text():
with open(readme_file) as f:
return f.read().strip()
setuptools.setup( setuptools.setup(
name='peru', name='peru',
description='A tool for fetching code', description='A tool for fetching code',
@ -54,4 +59,6 @@ setuptools.setup(
'peru=peru.main:main', 'peru=peru.main:main',
]}, ]},
install_requires=get_install_requires(), install_requires=get_install_requires(),
long_description=readme_text(),
long_description_content_type='text/markdown',
) )