summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 58cafd0c0e3c76d8fdc590705bf68832ac51875b (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
# Maintainer: Fantix King <fantix.king@gmail.com>
# Maintainer: Yuuta Liang <yuuta@yuuta.moe>
pkgname=python-immutables
pkgver=0.20
pkgrel=1
epoch=
pkgdesc="A high-performance immutable mapping type for Python"
arch=(x86_64)
url="https://github.com/MagicStack/immutables"
license=('custom')
groups=()
depends=('python')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
_name=${pkgname#python-}
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
noextract=()
md5sums=('34b027e8f17f66770f14f35abb260efc')
validpgpkeys=()

prepare() {
	cd "$_name-$pkgver"
}

build() {
	cd "$_name-$pkgver"
	python -m build --wheel --no-isolation
}

check() {
	cd "$_name-$pkgver"
	PYTHONPATH=$(ls -d build/lib*) IMMU_SKIP_MYPY_TESTS=1 python tests/__init__.py -v
}

package() {
	cd "$_name-$pkgver"
	python -m installer --destdir="$pkgdir" dist/*.whl
	mkdir -p $pkgdir/usr/share/licenses/${pkgname}/
	install -Dm644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/
}