summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ddb79d2736e972197c4975afa62cae15e4bbc29b (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
# Maintainer: Carl Smedstad <carsme@archlinux.org>
# Maintainer:  Anton Kudelin <kudelin at proton dot me>
# Contributor: Jelle van der Waa <jelle@vdwaa.nl>
# Contributor: Aaron DeVore <aaron.devore@gmail.com>

pkgname=python-selenium
_pkgname=${pkgname#python-}
pkgver=4.21.0
pkgrel=1
pkgdesc="Python language bindings for Selenium WebDriver"
arch=(any)
url="https://github.com/SeleniumHQ/selenium"
license=(Apache-2.0)
depends=(
  python
  python-certifi
  python-trio
  python-trio-websocket
  python-typing_extensions
  python-urllib3
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
checkdepends=(python-pytest)
source=("$pkgname-$pkgver.tar.gz::$url/archive/selenium-$pkgver.tar.gz")
sha256sums=('994b73642f0ce762b5dc1ae2805ce82bf4ff3e0370b7c37380514ca6ec55031f')

_archive="$_pkgname-selenium-$pkgver/py"

prepare() {
  cd "$_archive"

  cp ../rb/lib/selenium/webdriver/atoms/* selenium/webdriver/remote
  echo '{"frozen":{},"mutable":{}}' > \
    selenium/webdriver/firefox/webdriver_prefs.json
}

build() {
  cd "$_archive"

  python -m build --wheel --no-isolation
}

check() {
  cd "$_archive"

  pytest
}

package() {
  cd "$_archive"

  python -m installer --destdir="$pkgdir" dist/*.whl
}