# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-billiard
pkgver=4.2.0
pkgrel=1
pkgdesc="Python multiprocessing fork with improvements and bugfixes"
url="https://pypi.org/project/billiard/"
arch="noarch"
license="BSD-3-Clause"
makedepends="py3-setuptools py3-wheel py3-gpep517"
checkdepends="py3-psutil py3-pytest py3-nose py3-case"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/b/billiard/billiard-$pkgver.tar.gz"
builddir="$srcdir/billiard-$pkgver"

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

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

check() {
	# Uses wrong name for 'queue' module.
	# Uses internal 'test' and 'test.support' modules.
	rm -f t/integration/tests/test_multiprocessing.py

	# Windows only
	rm -f t/unit/test_win32.py

	py.test-3
}

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

sha512sums="
8f25cd44416cb5b89a4e511189d8381f7bd0b0bc15597d2adb4b4e3fe3542a651acd7803dea43dcf0a94e2be6347d509393dac7dcabf2902a5f81b3cad8b0685  billiard-4.2.0.tar.gz
"
