summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 60b6ea2facc14dce8d489389633de8c5a273e3fb (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
# Maintainer: xanderboy2001 <alexanderechristian@gmail.com>

pkgname=python-nbtlib
pkgver=2.0.4
pkgrel=2
pkgdesc="A python library to read and edit nbt data"
arch=('any')
url="https://github.com/vberlier/nbtlib"
license=('MIT')
depends=(
		'python'
		'python-numpy'
)
makedepends=(
		'python-build'
		'python-installer'
		'python-poetry-core'
)
source=("$pkgname-$pkgver.tar.gz::https://github.com/vberlier/nbtlib/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('eca23db8f63a3b5cf0d65a3eeaa2d516c5ceb4f44549ea8433b436c4c05e2a01')

prepare() {
		cd "nbtlib-$pkgver"
		sed -i \
				-e 's|requires = \["poetry>=0.12"\]|requires = ["poetry-core"]|' \
				-e 's|poetry.masonry.api|poetry.core.masonry.api|' \
				pyproject.toml
}

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

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