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