blob: e6608ddbc72dbcee2226d74238231fc175c1ee0a (
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
|
# Maintainer: Groctel <aur@taxorubio.com>
# shellcheck disable=SC1091,SC2034,SC2154,SC2164
_name=shutilwhich
pkgname=python-shutilwhich
pkgver=1.1.0
pkgrel=9
pkgdesc="A copy & paste backport of Python 3.3's shutil.which function."
arch=("any")
license=("PSF")
url="https://github.com/mbr/shutilwhich"
source=(
"$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
"LICENSE::https://raw.githubusercontent.com/mbr/$_name/refs/heads/master/LICENSE"
)
sha256sums=('4292a973312c58ca1935ea75d7bd378b17668ef6aacfc812d00019e0726dea44'
'a5e91eb1396daf80ad69801436d6fa7029141a7e05083af681ff54a57a6d7f9e')
depends=(
"python"
)
makedepends=(
"python-build"
"python-installer"
"python-setuptools"
"python-wheel"
)
checkdepends=(
"python-pytest"
"python-virtualenv"
)
build () {
cd "$srcdir/$_name-$pkgver"
python -m build --wheel --no-isolation
}
check () {
cd "$srcdir/$_name-$pkgver"
python -m venv --system-site-packages venv
source venv/bin/activate
pip install ./dist/*.whl
python -m pytest
rm -rf venv
}
package () {
cd "$_name-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|