summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6da8d2f9adb044dcaa64ff420c26915648329885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Maintainer: clalos <clalos at users dot noreply dot github dot com>

pkgname=browser-use-cli
_pyname=browser_use
pkgver=0.13.10
pkgrel=1
pkgdesc='CLI for browser automation with AI agents'
arch=(any)
url='https://github.com/browser-use/browser-use'
license=(MIT)
depends=(
  python
  python-aiofiles
  python-aiohttp
  python-anyio
  python-click
  python-cloudpickle
  python-distro
  python-dotenv
  python-google-api-core
  python-google-api-python-client
  python-google-auth
  python-google-auth-oauthlib
  python-httpx
  python-markdownify
  python-openai
  python-pillow
  python-psutil
  python-pydantic
  python-pydantic-settings
  python-portalocker
  python-pypdf
  python-pyotp
  python-reportlab
  python-requests
  python-rich
  python-screeninfo
  python-textual
  python-typing_extensions
  python-uuid7
  python-websockets
)
optdepends=(
  'python-anthropic: Anthropic/Claude LLM provider (AUR)'
  'python-docx: read/write .docx files in the agent filesystem (AUR)'
  'python-inquirerpy: interactive template selection for browser-use init (AUR)'
  'python-google-genai: Google Gemini LLM provider'
  'python-groq: Groq LLM provider'
  'python-ollama: Ollama local LLM provider'
  'python-mcp: MCP server mode'
  'python-posthog: telemetry'
)
makedepends=(
  python-build
  python-installer
  python-wheel
  python-hatchling
  python-setuptools
)
provides=(python-browser-use)
# Every .tar.gz entry is a PyPI sdist that is built and installed below. The
# first one is browser-use itself; the rest are runtime dependencies that are
# not packaged in the official repositories or the AUR. Keep their versions in
# sync with the pins in upstream's pyproject.toml.
source=(
  "https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_pyname-$pkgver.tar.gz"
  "https://files.pythonhosted.org/packages/source/b/bubus/bubus-1.5.6.tar.gz"
  "https://files.pythonhosted.org/packages/source/c/cdp_use/cdp_use-1.4.5.tar.gz"
  "https://files.pythonhosted.org/packages/source/b/browser_use_sdk/browser_use_sdk-3.4.2.tar.gz"
  "https://files.pythonhosted.org/packages/source/b/browser_harness/browser_harness-0.1.13.tar.gz"
  "https://files.pythonhosted.org/packages/source/f/fetch_use/fetch_use-0.4.0.tar.gz"
)
sha256sums=('f0e97fcad3319bc7a19ef7bb27eadf2e0824def0a916fd1988557dab9267cb17'
            '1a5456f0a576e86613a7bd66e819891b677778320b6e291094e339b0d9df2e0d'
            '0da3a32df46336a03ff5a22bc6bc442cd7d2f2d50a118fd4856f29d37f6d26a0'
            'be050bc803b31ec4e9f23dfd71d9dc5f1160d7dec0b962327915caf743a10208'
            '284dc547a042c309feafd9a9f4a74b2a8651b7963ea3ac6cb2f2d64889f6a8f3'
            '9511987d4907ec6dac501e21d66946d10098f66b5d21bc2aba4189cd81ba189a')

# Upstream pins exact versions of its build backends (hatchling, setuptools)
# that rarely match the ones in the repositories. The pinned versions bring
# nothing the packaged ones lack, so skip the check rather than fail on it.
build() {
  local _src
  for _src in "${source[@]##*/}"; do
    [[ $_src == *.tar.gz ]] || continue
    cd "$srcdir/${_src%.tar.gz}"
    python -m build --wheel --skip-dependency-check --no-isolation
  done
}

package() {
  local _src
  for _src in "${source[@]##*/}"; do
    [[ $_src == *.tar.gz ]] || continue
    python -m installer --destdir="$pkgdir" "$srcdir/${_src%.tar.gz}"/dist/*.whl
  done

  install -Dm644 "$_pyname-$pkgver/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
}

# vim:set sw=2 sts=-1 et: