summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 988cd3e542ad099348b7f3a01c7643da1e899f1f (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-urlextract
_name=urlextract
pkgver=1.8.0
pkgrel=1
pkgdesc='Collects and extracts URLs from given text.'
arch=('any')
url=https://github.com/lipoja/URLExtract
license=('MIT')
depends=('python-idna' 'python-uritools' 'python-platformdirs' 'python-dnspython')
makedepends=('python-build' 'python-installer' 'python-wheel' )
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('3573f6b812814efe06ca46e91e82d984edaa3cd07daaaaa296a467ad9881a037')

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"/$pkgname-$pkgver.dist-info/licenses/LICENSE \
	   "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}