From ece1cdd55774949bae7fa265dbd3e1810690ae29 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 7 Jun 2023 16:56:24 -0700 Subject: [PATCH] aider: Updated the `setup.py` to use the `README.md` as the long description source. # Context: USER: update the `setup.py` to use README.md as the long description source ASSISTANT: To update the `setup.py` to use the `README.md` as the long description source, follow these steps: 1. Read the contents of the `README.md` file and store it in a variable. 2. Add the `long_description` and `long_description_content_type` arguments to the `setup()` function. Here's the updated `setup.py`: ```python setup.py <<<<<<< ORIGINAL from setuptools import find_packages, setup with open("requirements.txt") as f: requirements = f.read().splitlines() setup( name="aider-chat", version="0.5.0", packages=find_packages(), install_requires=requirements, entry_points={ "console_scripts": [ "aider = aider.main:main", ], }, ) ======= from setuptools import find_packages, setup with open("requirements.txt") as f: requirements = f.read().splitlines() with open("README.md", "r", encoding="utf-8") as f: long_description = f.read() setup( name="aider-chat", version="0.5.0", packages=find_packages(), install_requires=requirements, entry_points={ "console_scripts": [ "aider = aider.main:main", ], }, long_description=long_description, long_description_content_type="text/markdown", ) >>>>>>> UPDATED ``` --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 26a64eb3f..7a9cbc2c1 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,9 @@ from setuptools import find_packages, setup with open("requirements.txt") as f: requirements = f.read().splitlines() +with open("README.md", "r", encoding="utf-8") as f: + long_description = f.read() + setup( name="aider-chat", version="0.5.0", @@ -13,4 +16,6 @@ setup( "aider = aider.main:main", ], }, + long_description=long_description, + long_description_content_type="text/markdown", )