diff --git a/aider/help.py b/aider/help.py index f484c041a..ae5aa8200 100755 --- a/aider/help.py +++ b/aider/help.py @@ -6,7 +6,6 @@ import warnings from pathlib import Path import importlib_resources -from tqdm import tqdm from aider.dump import dump # noqa: F401 @@ -74,10 +73,11 @@ def get_index(): parser = MarkdownNodeParser() nodes = [] - for fname in tqdm(list(get_package_files())): + for fname in get_package_files(): fname = Path(fname) if any(fname.match(pat) for pat in exclude_website_pats): continue + doc = Document( text=importlib_resources.files("website").joinpath(fname).read_text(), metadata=dict( diff --git a/setup.py b/setup.py index ebce167f9..4c01eccbd 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,7 @@ with open("requirements.txt") as f: requirements = f.read().splitlines() from aider import __version__ +from aider.help import exclude_website_pats with open("README.md", "r", encoding="utf-8") as f: long_description = f.read() @@ -13,13 +14,9 @@ with open("README.md", "r", encoding="utf-8") as f: # long_description = re.sub(r"\n- \[.*\]\(.*\)", "", long_description) # Debug: Print discovered packages -packages = find_packages() +packages = find_packages() + ["website"] print("Discovered packages:", packages) -# Debug: Print package data -package_data = {"aider": ["queries/*"]} -print("Package data:", package_data) - # Note: The 'build' directory is populated when running commands like # 'python setup.py sdist bdist_wheel', which use this setup() configuration # to build distribution packages. @@ -27,11 +24,13 @@ print("Package data:", package_data) setup( name="aider-chat", version=__version__, - packages=find_packages(), + packages=packages, include_package_data=True, package_data={ - "aider": ["queries/*"], + "aider": ["queries/*.scm"], + "website": ["**/*.md"], }, + exclude_package_data={"website": exclude_website_pats}, install_requires=requirements, python_requires=">=3.9,<3.13", entry_points={