mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-10-31 16:31:40 +01:00 
			
		
		
		
	we never use pip in the venv manually made for tests- this might break 1-2 things unexpectedly, but - those should be looked at anyway - this has a severe speedup- even on a desktop machine with nvme, this makes an arbitrary venv go from 2.6s to <100ms(!) to make. a nice small optimisation.
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
 | |
| # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
 | |
| pkgname=py3-ansi2html
 | |
| _pkgname=ansi2html
 | |
| pkgver=1.8.0
 | |
| pkgrel=2
 | |
| pkgdesc="Convert text with ANSI color codes to HTML"
 | |
| url="https://github.com/pycontribs/ansi2html"
 | |
| arch="noarch"
 | |
| license="LGPL-3.0-or-later"
 | |
| depends="python3"
 | |
| makedepends="
 | |
| 	py3-gpep517
 | |
| 	py3-installer
 | |
| 	py3-setuptools_scm
 | |
| 	py3-wheel
 | |
| 	"
 | |
| checkdepends="py3-pytest"
 | |
| source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
 | |
| builddir="$srcdir"/$_pkgname-$pkgver
 | |
| 
 | |
| replaces="py-ansi2html" # for backwards compatibility
 | |
| provides="py-ansi2html=$pkgver-r$pkgrel" # for backwards compatibility
 | |
| 
 | |
| export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
 | |
| 
 | |
| build() {
 | |
| 	gpep517 build-wheel \
 | |
| 		--wheel-dir dist \
 | |
| 		--output-fd 3 3>&1 >&2
 | |
| }
 | |
| 
 | |
| check() {
 | |
| 	python3 -m venv --clear --without-pip --system-site-packages testenv
 | |
| 	testenv/bin/python3 -m installer dist/ansi2html-$pkgver-py3-none-any.whl
 | |
| 	PATH="$PATH:$PWD/testenv/bin" testenv/bin/python3 -m pytest
 | |
| }
 | |
| 
 | |
| package() {
 | |
| 	python3 -m installer --destdir "$pkgdir" \
 | |
| 		dist/ansi2html-$pkgver-py3-none-any.whl
 | |
| }
 | |
| 
 | |
| sha512sums="
 | |
| cbdda41f206ced5b19761a1ff9747acc6cadca3a5a2f58c97c6073db7d517e59fea7601bba28a8e7e105f3c0c9c4d78ca4f242100cbded6c8a9ca2d598de0ab4  ansi2html-1.8.0.tar.gz
 | |
| "
 |