From 9a39f00c396d4148457373efc0b21183237179d5 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 9 Jul 2024 14:40:59 +0100 Subject: [PATCH] Remove `--extra-index-url` line from requirements.txt and conditionally install `torch` from the specified URL in setup.py. --- requirements.txt | 2 -- setup.py | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index c4a0954ec..ec5d86099 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,8 +4,6 @@ # # pip-compile requirements.in # ---extra-index-url https://download.pytorch.org/whl/cpu - aiohttp==3.9.5 # via # huggingface-hub diff --git a/setup.py b/setup.py index 60dfc95b4..6095c6486 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,13 @@ with open("README.md", "r", encoding="utf-8") as f: packages = find_packages(exclude=["benchmark"]) + ["aider.website"] print("Discovered packages:", packages) +import subprocess + +# Install torch from the specific URL +subprocess.check_call([ + "pip", "install", "torch==2.2.2", "--extra-index-url", "https://download.pytorch.org/whl/cpu" +]) + setup( name="aider-chat", version=__version__,