From 2333e62b6aa0d5c27f223a24c1d79015a4bf5f35 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 9 May 2023 10:57:56 -0700 Subject: [PATCH] Add setup.py file that reads requirements.txt for dependencies and sets up CLI script. # Context: USER: make a setup.py for this project. it includes a cli script in main(). have setup.py read requirements.txt to get the install_requires ASSISTANT: To create a `setup.py` file for this project, we'll use the `setuptools` package. We'll also read the `requirements.txt` file to get the `install_requires` dependencies. Here's the change: ```python setup.py <<<<<<< ORIGINAL ======= from setuptools import setup, find_packages with open("requirements.txt") as f: requirements = f.read().splitlines() setup( name="aider", version="0.1.0", packages=find_packages(), install_requires=requirements, entry_points={ "console_scripts": [ "aider = aider.main:main", ], }, ) >>>>>>> UPDATED ``` This will create a `setup.py` file that reads the `requirements.txt` file for dependencies and sets up the CLI script for the `main()` function in `aider.main`. --- setup.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/setup.py b/setup.py index e69de29bb..5526f917f 100644 --- a/setup.py +++ b/setup.py @@ -0,0 +1,16 @@ +from setuptools import setup, find_packages + +with open("requirements.txt") as f: + requirements = f.read().splitlines() + +setup( + name="aider", + version="0.1.0", + packages=find_packages(), + install_requires=requirements, + entry_points={ + "console_scripts": [ + "aider = aider.main:main", + ], + }, +)