~dricottone/huttese-apk

huttese-apk/pkgsrc/py3-ansi2html/APKBUILD -rw-r--r-- 1.2 KiB
c845640fDominic Ricottone Cleanup 1 year, 8 months ago
                                                                                
cb4c58b7 Drew DeVault
82f7e535 Drew DeVault
cb4c58b7 Drew DeVault
cb4c58b7 Drew DeVault
d2fca433 Drew DeVault
cb4c58b7 Drew DeVault
cb4c58b7 Drew DeVault
cb4c58b7 Drew DeVault
cb4c58b7 Drew DeVault
82f7e535 Drew DeVault
82f7e535 Drew DeVault
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-ansi2html
_pyname=ansi2html
pkgver=1.8.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_scm py3-wheel py3-installer py3-build"
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

prepare() {
	sed -i pyproject.toml -e 's/.*setuptools_scm_git_archive.*//g'
}

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	python3 -m build --no-isolation --wheel .
}

check() {
	PYTHONPATH="$(pwd)" pytest-3
}

package() {
	python3 -m installer --destdir="$pkgdir" \
		dist/ansi2html-$pkgver-py3-none-any.whl
}

sha512sums="
cbdda41f206ced5b19761a1ff9747acc6cadca3a5a2f58c97c6073db7d517e59fea7601bba28a8e7e105f3c0c9c4d78ca4f242100cbded6c8a9ca2d598de0ab4  ansi2html-1.8.0.tar.gz
"