~dricottone/apkbuilds

ref: 5227293f32cf5072200e1d4aa78c9a434f272472 apkbuilds/src/py3-ansi2html/APKBUILD -rw-r--r-- 1.2 KiB
5227293fDominic Ricottone Alpine 3.19 5 months ago
                                                                                
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.9.1
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="
1ffeffdd4f861b809c424b5b9e7d07212aaf1b5ef483a2820f128f815002628c823b5701652b0770ed182f0585052f040b55fca5db31e4690be86c49553105b3  ansi2html-1.9.1.tar.gz
"