# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-cmake-build-extension
pkgver=0.6.0
pkgrel=0
pkgdesc="Setuptools extension to build and package CMake projects"
url="https://github.com/diegoferigo/cmake-build-extension"
arch="noarch"
license="MIT"
depends="python3"
makedepends="
	py3-gpep517
	py3-installer
	py3-setuptools_scm
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/diegoferigo/cmake-build-extension/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/cmake-build-extension-$pkgver"
options="!check" # no tests

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
47dd51adae2767c8ec50e4e900bc783e2aa61c747c99300e7f180912395fc6a592bd4ace2eb84a3e8ac27105ad5f22b4ff1559bb25d7572a573f49cb005800db  py3-cmake-build-extension-0.6.0.tar.gz
"
