diff --git a/misc/py-aider-chat/Makefile b/misc/py-aider-chat/Makefile index 455d0aa783a9..bdc939f240d8 100644 --- a/misc/py-aider-chat/Makefile +++ b/misc/py-aider-chat/Makefile @@ -1,66 +1,66 @@ PORTNAME= aider_chat -DISTVERSION= 0.42.0 +DISTVERSION= 0.45.0 CATEGORIES= misc python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= aider_chat-${PORTVERSION} MAINTAINER= dch@FreeBSD.org COMMENT= AI pair programming in your terminal WWW= https://aider.chat/ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE.txt BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}arrow>0:devel/py-arrow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}backoff>0:devel/py-backoff@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}beautifulsoup>=0:www/py-beautifulsoup@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}blinker>0:devel/py-blinker@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}cachetools>0:devel/py-cachetools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}configargparse>0:devel/py-configargparse@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}diff-match-patch>=0:textproc/py-diff-match-patch@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}diskcache>=0:devel/py-diskcache@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}flake8>0:devel/py-flake8@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}gitpython>0:devel/py-gitpython@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}greenlet>=0:devel/py-greenlet@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}grep-ast>0:textproc/py-grep-ast@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}huggingface-hub>0:misc/py-huggingface-hub@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}jsonschema>=0:devel/py-jsonschema@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}litellm>=1.24.5:misc/py-litellm@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}networkx>0:math/py-networkx@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}openai>=1.0.0:misc/py-openai@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pathspec>0:devel/py-pathspec@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}prompt-toolkit>0:devel/py-prompt-toolkit@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pypandoc>=0:textproc/py-pypandoc@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyyaml-include>=1.2:devel/py-pyyaml-include@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}rich>0:textproc/py-rich@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sounddevice>=0:audio/py-sounddevice@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}SoundFile>=0.12.1:audio/py-SoundFile@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}streamlit>0:www/py-streamlit@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}tiktoken>=0.7.0:textproc/py-tiktoken@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}tokenizers>0:textproc/py-tokenizers@${PY_FLAVOR} # missing dependencies # playwright its a chromium browser automation library # watchdog is pulled in by streamlit # google-generativeai is not a popular aider dependency USES= python shebangfix USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes PORTDOCS= README.md OPTIONS_DEFINE= DOCS post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} \ ${STAGEDIR}${DOCSDIR} .include diff --git a/misc/py-aider-chat/distinfo b/misc/py-aider-chat/distinfo index 5947b8872afc..e764ae7be70f 100644 --- a/misc/py-aider-chat/distinfo +++ b/misc/py-aider-chat/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1720106776 -SHA256 (aider_chat-0.42.0.tar.gz) = e64a63befcadea2500485ed7c60f91495e31d3a33c9955bd18fe9901c0d0f31e -SIZE (aider_chat-0.42.0.tar.gz) = 124553 +TIMESTAMP = 1722097913 +SHA256 (aider_chat-0.45.0.tar.gz) = 47afeb18a342dd5d33aa1b034ca04120b7a599f55c127365297bc097ee565b6b +SIZE (aider_chat-0.45.0.tar.gz) = 135453 diff --git a/misc/py-aider-chat/files/patch-aider_scrape.py b/misc/py-aider-chat/files/patch-aider_scrape.py index 6ba15a5ce575..f590cbbf2c49 100644 --- a/misc/py-aider-chat/files/patch-aider_scrape.py +++ b/misc/py-aider-chat/files/patch-aider_scrape.py @@ -1,80 +1,72 @@ ---- aider/scrape.py.orig 2024-07-04 14:23:32 UTC +--- aider/scrape.py.orig 2024-07-27 19:09:04 UTC +++ aider/scrape.py -@@ -3,9 +3,7 @@ import sys - import re - import sys +@@ -15,56 +15,9 @@ def install_playwright(io): --import playwright - import pypandoc --from playwright.sync_api import sync_playwright - from aider import __version__, urls - from aider.dump import dump # noqa: F401 -@@ -42,14 +40,10 @@ class Scraper: - """ - Scrape a url and turn it into readable markdown. + def install_playwright(io): +- try: +- from playwright.sync_api import sync_playwright ++ return -- `url` - the URLto scrape. -+ `url` - the URL to scrape. - """ -- self.try_playwright() +- has_pip = True +- except ImportError: +- has_pip = False -- if self.playwright_available: -- content = self.scrape_with_playwright(url) -- else: -- content = self.scrape_with_httpx(url) -+ content = self.scrape_with_httpx(url) - - if not content: - return -@@ -62,50 +56,8 @@ class Scraper: - - # Internals... - def scrape_with_playwright(self, url): +- try: - with sync_playwright() as p: -- try: -- browser = p.chromium.launch() -- except Exception as e: -- self.playwright_available = False -- self.print_error(e) -- return +- p.chromium.launch() +- has_chromium = True +- except Exception: +- has_chromium = False - -- page = browser.new_page() +- if has_pip and has_chromium: +- return True - -- user_agent = page.evaluate("navigator.userAgent") -- user_agent = user_agent.replace("Headless", "") -- user_agent = user_agent.replace("headless", "") -- user_agent += " " + aider_user_agent +- pip_cmd = utils.get_pip_install(["aider-chat[playwright]"]) +- chromium_cmd = "playwright install --with-deps chromium".split() - -- page = browser.new_page(user_agent=user_agent) -- try: -- page.goto(url, wait_until="networkidle", timeout=5000) -- except playwright._impl._errors.TimeoutError: -- pass -- content = page.content() -- browser.close() +- cmds = "" +- if not has_pip: +- cmds += " ".join(pip_cmd) + "\n" +- if not has_chromium: +- cmds += " ".join(chromium_cmd) + "\n" - -- return content +- text = f"""For the best web scraping, install Playwright: - -- def try_playwright(self): -- if self.playwright_available is not None: -- return +-{cmds} +-See {urls.enable_playwright} for more info. +-""" - -- try: -- with sync_playwright() as p: -- p.chromium.launch() -- self.playwright_available = True -- except Exception: - self.playwright_available = False +- io.tool_error(text) +- if not io.confirm_ask("Install playwright?", default="y"): +- return - -- def get_playwright_instructions(self): -- if self.playwright_available in (True, None): - return -- if self.playwright_instructions_shown: +- if not has_pip: +- success, output = utils.run_install(pip_cmd) +- if not success: +- io.tool_error(output) - return - -- self.playwright_instructions_shown = True -- return PLAYWRIGHT_INFO +- 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 +@@ -89,10 +42,7 @@ class Scraper: + `url` - the URLto scrape. + """ + +- if self.playwright_available: +- content = self.scrape_with_playwright(url) +- else: +- content = self.scrape_with_httpx(url) ++ content = self.scrape_with_httpx(url) - def scrape_with_httpx(self, url): - import httpx + if not content: + return diff --git a/misc/py-aider-chat/files/patch-setup.py b/misc/py-aider-chat/files/patch-setup.py new file mode 100644 index 000000000000..6a9f4e08d16e --- /dev/null +++ b/misc/py-aider-chat/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2024-07-27 19:19:07 UTC ++++ setup.py +@@ -33,7 +33,7 @@ print("Packages:", packages) + + print("Packages:", packages) + +-extras = "dev help browser playwright".split() ++extras = [] + + setup( + name="aider-chat", diff --git a/www/py-streamlit/Makefile b/www/py-streamlit/Makefile index 6ae167025016..3ff330807c46 100644 --- a/www/py-streamlit/Makefile +++ b/www/py-streamlit/Makefile @@ -1,36 +1,36 @@ PORTNAME= streamlit -DISTVERSION= 1.34.0 +DISTVERSION= 1.37.0 CATEGORIES= www python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= dch@FreeBSD.org COMMENT= Turn data scripts into shareable web apps in minutes, in pure python WWW= https://streamlit.io/ LICENSE= APACHE20 BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}altair>0:graphics/py-altair@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}click>0:devel/py-click@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}numpy>0:math/py-numpy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pandas>0:math/py-pandas@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}protobuf>=4.21.6,1:devel/py-protobuf@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyarrow>0:databases/py-pyarrow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}rich>=0:textproc/py-rich@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}tenacity>0:devel/py-tenacity@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}toml>=0:textproc/py-toml@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}tornado>0:www/py-tornado@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}watchdog>0:devel/py-watchdog@${PY_FLAVOR} USES= python shebangfix USE_PYTHON= autoplist concurrent pep517 NO_ARCH= yes .include diff --git a/www/py-streamlit/distinfo b/www/py-streamlit/distinfo index 8b411c28a846..a5152f172a56 100644 --- a/www/py-streamlit/distinfo +++ b/www/py-streamlit/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1716368381 -SHA256 (streamlit-1.34.0.tar.gz) = 135a3b79a686b3132b73f204450ad6e889de04f3349d692925e09f0e21e74b52 -SIZE (streamlit-1.34.0.tar.gz) = 8142532 +TIMESTAMP = 1722096984 +SHA256 (streamlit-1.37.0.tar.gz) = 463ef728ba21e74e05122e3704e8af644a7bdbb5822e281b8daf4a0a48761879 +SIZE (streamlit-1.37.0.tar.gz) = 8274522