# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-ansi2html
_pyname=ansi2html
pkgver=1.7.0
pkgrel=0
pkgdesc="Convert text with ANSI color codes to HTML"
url="http://github.com/ralphbean/ansi2html/"
arch="noarch"
license="LGPL-3.0-or-later"
depends="py3-six"
makedepends="py3-setuptools py3-setuptools_scm py3-toml pyproject2setuppy"
checkdepends="py3-pytest py3-mock py3-nose"
replaces="py-ansi2html py2-ansi2html"
_pypiprefix="${_pyname%${_pyname#?}}"
source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
options="!check" # Upstream tests are stupid
build() {
python3 -m pyproject2setuppy.main build
}
check() {
PYTHONPATH="$(pwd)" pytest-3
}
package() {
python3 -m pyproject2setuppy.main install --prefix=/usr --root="$pkgdir"
}
sha512sums="
bcae0de9874899bd8440853b8279f3b2c4ed46e24bf807221ddc9d1bfa39647e2efd178aefc2fd39bad27b53890270b6ff7c150a0b8e74581b8323ef7a16c977 ansi2html-1.7.0.tar.gz
"