summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 093c5033ccba287e4fd163953683f485f35c0208 (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
pkgname=python-nodriver
_name=nodriver
pkgver=0.36
pkgrel=1
pkgdesc='Successor of Undetected-Chromedriver.'
arch=('any')
url=https://github.com/UltrafunkAmsterdam/nodriver
license=('GPL3')
depends=('python-mss' 'python-deprecated' 'python-websockets')
makedepends=('python-build' 'python-installer' 'python-wheel' )
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('69cd7847d6d7bfe3bc8498adc2c0a0b54649267edd085c4adbf88949f790cc23')

build() {
	cd $_name-$pkgver
	python -m build --wheel --skip-dependency-check --no-isolation
}

check() {
	cd $_name-$pkgver
}

package() {
	cd $_name-$pkgver
	python -m installer --destdir="$pkgdir" dist/*.whl

	# Symlink license file
	local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
	install -d "$pkgdir"/usr/share/licenses/$pkgname
	ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
	   "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}