# Contributor: Newbyte <newbyte@disroot.org>
# Maintainer: Newbyte <newbyte@disroot.org>
pkgname=py3-redbaron
pkgver=0.9.2
pkgrel=4
pkgdesc="Abstraction of top of baron, a FST for Python to make writing refactoring code a realistic task"
url="https://github.com/PyCQA/redbaron"
arch="noarch"
license="LGPL-3.0-or-later"
depends="python3 py3-baron"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="
	https://files.pythonhosted.org/packages/source/r/redbaron/redbaron-$pkgver.tar.gz
	0001-Fix-tests-under-pytest-4.patch
	"
builddir="$srcdir/redbaron-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# fails due to minor color difference in diff
	pytest -k 'not test_highlight'
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
a91670b0c48ac399ea9a000be42f1d4d4451ec39b58b2a7029a3bcdf664136dab3ff8e81284b384ddabfb77a5fa43ce4d75041d3aed5685d451ab620dfa23e9a  redbaron-0.9.2.tar.gz
d100fa5e8d4998a4a023796673e9905d9be9b511faa9cf91d7c8913f45b9c3a5db596cf83ab8b7160b102aeaea7ea25d589db72d787540f14d1adb6afaf1389a  0001-Fix-tests-under-pytest-4.patch
"
