mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
misc/py-aider-chat: update to 0.83.0
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PORTNAME= aider_chat
|
||||
DISTVERSION= 0.82.2
|
||||
DISTVERSION= 0.83.0
|
||||
CATEGORIES= misc python
|
||||
MASTER_SITES= PYPI
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
@@ -41,7 +41,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}arrow>=1.3:devel/py-arrow@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pathspec>=0.12.1:devel/py-pathspec@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pexpect>=4.9.0:misc/py-pexpect@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pillow>=10.4.0:graphics/py-pillow@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}posthog>=3.7.0:misc/py-posthog@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}posthog>=4.0.1:misc/py-posthog@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}prompt-toolkit>=3.0.47:devel/py-prompt-toolkit@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}psutil>=5.8.0:sysutils/py-psutil@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pydub>=0.25:audio/py-pydub@${PY_FLAVOR} \
|
||||
@@ -49,7 +49,8 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}arrow>=1.3:devel/py-arrow@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pyperclip>=1.7.0:devel/py-pyperclip@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pyyaml-include>=1.2:devel/py-pyyaml-include@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}rich>=13.8:textproc/py-rich@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}scipy>=1.11,1<1.14,1:science/py-scipy@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}scipy>=1.11,1:science/py-scipy@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}shtab>0:devel/py-shtab@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}socksio>=1<2:net/py-socksio@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}sounddevice>=0.5.0:audio/py-sounddevice@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}SoundFile>=0.12:audio/py-SoundFile@${PY_FLAVOR} \
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1746434942
|
||||
SHA256 (aider_chat-0.82.2.tar.gz) = fb725d4b5c7874a76b113bee3ab49e1a4c7daeae6f30accc6fd36960aa4f5928
|
||||
SIZE (aider_chat-0.82.2.tar.gz) = 1280757
|
||||
TIMESTAMP = 1747997462
|
||||
SHA256 (aider_chat-0.83.0.tar.gz) = e2ce2ea5881d92327a75b07f4a983c053a4f488d05b078d67bc2efa0b54661ff
|
||||
SIZE (aider_chat-0.83.0.tar.gz) = 1301188
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--- aider/commands.py.orig 2025-04-14 23:24:32 UTC
|
||||
--- aider/commands.py.orig 2025-05-09 22:41:18 UTC
|
||||
+++ aider/commands.py
|
||||
@@ -21,7 +21,7 @@ from aider.run_cmd import run_cmd
|
||||
from aider.llm import litellm
|
||||
@@ -9,17 +9,23 @@
|
||||
from aider.utils import is_image_file
|
||||
|
||||
from .dump import dump # noqa: F401
|
||||
@@ -219,14 +219,6 @@ class Commands:
|
||||
@@ -220,20 +220,6 @@ class Commands:
|
||||
return
|
||||
|
||||
self.io.tool_output(f"Scraping {url}...")
|
||||
- if not self.scraper:
|
||||
- res = install_playwright(self.io)
|
||||
- if not res:
|
||||
- self.io.tool_warning("Unable to initialize playwright.")
|
||||
- disable_playwright = getattr(self.args, "disable_playwright", False)
|
||||
- if disable_playwright:
|
||||
- res = False
|
||||
- else:
|
||||
- res = install_playwright(self.io)
|
||||
- if not res:
|
||||
- self.io.tool_warning("Unable to initialize playwright.")
|
||||
-
|
||||
- self.scraper = Scraper(
|
||||
- print_error=self.io.tool_error, playwright_available=res, verify_ssl=self.verify_ssl
|
||||
- print_error=self.io.tool_error,
|
||||
- playwright_available=res,
|
||||
- verify_ssl=self.verify_ssl,
|
||||
- )
|
||||
|
||||
content = self.scraper.scrape(url) or ""
|
||||
|
||||
@@ -1,65 +1,6 @@
|
||||
--- aider/scrape.py.orig 2025-04-14 23:24:32 UTC
|
||||
--- aider/scrape.py.orig 2025-05-09 22:41:18 UTC
|
||||
+++ aider/scrape.py
|
||||
@@ -15,57 +15,8 @@ def install_playwright(io):
|
||||
|
||||
|
||||
def install_playwright(io):
|
||||
- try:
|
||||
- from playwright.sync_api import sync_playwright
|
||||
+ return False
|
||||
|
||||
- has_pip = True
|
||||
- except ImportError:
|
||||
- has_pip = False
|
||||
-
|
||||
- try:
|
||||
- with sync_playwright() as p:
|
||||
- p.chromium.launch()
|
||||
- has_chromium = True
|
||||
- except Exception:
|
||||
- has_chromium = False
|
||||
-
|
||||
- if has_pip and has_chromium:
|
||||
- return True
|
||||
-
|
||||
- pip_cmd = utils.get_pip_install(["aider-chat[playwright]"])
|
||||
- chromium_cmd = "-m playwright install --with-deps chromium"
|
||||
- chromium_cmd = [sys.executable] + chromium_cmd.split()
|
||||
-
|
||||
- cmds = ""
|
||||
- if not has_pip:
|
||||
- cmds += " ".join(pip_cmd) + "\n"
|
||||
- if not has_chromium:
|
||||
- cmds += " ".join(chromium_cmd) + "\n"
|
||||
-
|
||||
- text = f"""For the best web scraping, install Playwright:
|
||||
-
|
||||
-{cmds}
|
||||
-See {urls.enable_playwright} for more info.
|
||||
-"""
|
||||
-
|
||||
- io.tool_output(text)
|
||||
- if not io.confirm_ask("Install playwright?", default="y"):
|
||||
- return
|
||||
-
|
||||
- if not has_pip:
|
||||
- success, output = utils.run_install(pip_cmd)
|
||||
- if not success:
|
||||
- io.tool_error(output)
|
||||
- return
|
||||
-
|
||||
- success, output = utils.run_install(chromium_cmd)
|
||||
- if not success:
|
||||
- io.tool_error(output)
|
||||
- return
|
||||
-
|
||||
- return True
|
||||
-
|
||||
-
|
||||
class Scraper:
|
||||
pandoc_available = None
|
||||
playwright_available = None
|
||||
@@ -82,7 +33,7 @@ class Scraper:
|
||||
@@ -92,7 +92,7 @@ class Scraper:
|
||||
else:
|
||||
self.print_error = print
|
||||
|
||||
@@ -68,7 +9,7 @@
|
||||
self.verify_ssl = verify_ssl
|
||||
|
||||
def scrape(self, url):
|
||||
@@ -93,10 +44,7 @@ class Scraper:
|
||||
@@ -103,10 +103,7 @@ class Scraper:
|
||||
`url` - the URL to scrape.
|
||||
"""
|
||||
|
||||
@@ -80,7 +21,7 @@
|
||||
|
||||
if not content:
|
||||
self.print_error(f"Failed to retrieve content from {url}")
|
||||
@@ -128,58 +76,6 @@ class Scraper:
|
||||
@@ -138,58 +135,6 @@ class Scraper:
|
||||
]
|
||||
return any(re.search(pattern, content, re.IGNORECASE) for pattern in html_patterns)
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user