# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-ioflo
_pkgname=ioflo
pkgver=2.0.2
pkgrel=1
pkgdesc="Automated Reasoning Engine and Flow Based Programming Framework"
url="https://github.com/ioflo/ioflo"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools-git py3-setuptools"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
	python-3.9.patch
	"
builddir="$srcdir"/$_pkgname-$pkgver

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

build() {
	python3 setup.py build
}

check() {
	py.test-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	# keep ioflo and remove ioflo3
	rm -f "$pkgdir"/usr/bin/ioflo3
}

sha512sums="7f704ccd5680b612d63990915259999e967d87dadd25608143dbc6ecf7a7679eb33f1c11c2d490a358845946add668e6014b80705db8701127b5d05ac436cc4b  ioflo-2.0.2.tar.gz
f951ce837fbe501535b6baab8e4f998af14660c0ec375e01b2526fd848c8d24ceae822263a256befea75163fade36ab059c775b53d5e96fe514097516d9d5726  python-3.9.patch"