35 lines
935 B
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer:
pkgname=python-hatch-nodejs-version
pkgver=0.3.2
pkgrel=2
pkgdesc='Hatch plugin for versioning from a package.json file'
arch=(any)
url='https://github.com/agoose77/hatch-nodejs-version'
license=(MIT)
depends=(python
python-hatchling)
makedepends=(python-build
python-installer)
checkdepends=(python-pytest)
source=(https://github.com/agoose77/hatch-nodejs-version/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('c01dae87afcb7b6db421b5248154de26c556e569e2631e9f146bc5c78447eee6')
build() {
cd hatch-nodejs-version-$pkgver
python -m build --wheel --no-isolation
}
check() {
cd hatch-nodejs-version-$pkgver
PYTHONPATH="$PWD"/src \
pytest -v
}
package() {
cd hatch-nodejs-version-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}