# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Tiago Ilieve <tiago.myhro@gmail.com>
# Maintainer: Tiago Ilieve <tiago.myhro@gmail.com>
pkgname=py3-automat
pkgver=24.8.1
pkgrel=0
pkgdesc="Self-service finite-state machines for the programmer on the go"
url="https://automat.readthedocs.io/"
arch="noarch"
license="MIT"
depends="py3-attrs py3-six"
makedepends="py3-wheel py3-setuptools_scm py3-build py3-installer"
checkdepends="py3-pytest py3-pluggy"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/glyph/automat/archive/v$pkgver.tar.gz"
builddir="$srcdir/automat-$pkgver"
options="!check" # no tests

replaces="py-automat" # Backwards compatibility
provides="py-automat=$pkgver-r$pkgrel" # Backwards compatibility

prepare() {
	default_prepare
}

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	python -m build --wheel --no-isolation
}

package() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	python3 -m installer --destdir="$pkgdir" dist/*.whl
}

sha512sums="
77d1f31ea045e1da22dc2f10104bed0f302e5d47af3e3158e74693b5af35c6aa08199dd816da8b1e8baa92f7e7eaefa06e0b748ff47662bceb13d1ef27e5c01f  py3-automat-24.8.1.tar.gz
"
