mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
refactored exclude_website_pats
This commit is contained in:
parent
b1feb53e9c
commit
9f7197974f
2 changed files with 8 additions and 9 deletions
|
@ -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(
|
||||
|
|
13
setup.py
13
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={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue