# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-ordpy
pkgver=1.1.4
pkgrel=1
pkgdesc="A Python package for data analysis with permutation entropy and ordinal network methods"
url="https://github.com/arthurpessa/ordpy"
arch="noarch"
license="MIT"
depends="python3 py3-numpy"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/arthurpessa/ordpy/archive/v$pkgver/ordpy-$pkgver.tar.gz"
builddir="$srcdir/ordpy-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

# no tests provided by the upstream; use smoke tests
check() {
	PYTHONPATH=build/lib python3 -c "import ordpy"
}

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

	install -Dm644 README.rst -t "$pkgdir"/usr/share/doc/$pkgname
	install -Dm644 CITATION.cff -t "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
712c74f0a9d81807dde6c927c53393e6bdce07d125a5cc30d3b93c26c4050f25e91cb93ebdeeac619765b635c11093a40dc71d05ab4fa3f97e506491fe74590b  ordpy-1.1.4.tar.gz
"
