# Contributor: Oleg Titov # Maintainer: Oleg Titov pkgname=py3-zimscraperlib pkgver=3.2.0 pkgrel=0 pkgdesc="Collection of python code to re-use across python-based scrapers" url="https://github.com/openzim/python-scraperlib" arch="noarch" license="GPL-3.0-or-later" depends=" ffmpeg gifsicle py3-pillow py3-six wget " makedepends="py3-gpep517 py3-setuptools py3-wheel" checkdepends=" py3-babel py3-beautifulsoup4 py3-colorthief py3-iso639 py3-libzim py3-lxml py3-magic py3-optimize-images py3-piexif py3-pytest py3-pytest-cov py3-pytest-httpbin py3-resizeimage py3-requests py3-wsgiprox yt-dlp-core " subpackages="$pkgname-pyc" source="py3-zimscraperlib-$pkgver.tar.gz::https://github.com/openzim/python-scraperlib/archive/refs/tags/v$pkgver.tar.gz" builddir="$srcdir/python-scraperlib-$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/*.whl # some tests may fail, so disable them # https://github.com/openzim/python-scraperlib/issues/114 .testenv/bin/python3 -m pytest \ -k "not test_get_media_info[mp4-video.mp4-expected1]"` \ `" and not test_reencode_media[video.mkv-video.mp4-ffmpeg_args0-expected0]"` \ `" and not test_selocale_unsupported"` \ `" and not test_installed_script" \ --runslow --runinstalled \ --cov=zimscraperlib \ --cov-report=term --cov-report term-missing } package() { python3 -m installer -d "$pkgdir" \ .dist/*.whl } sha512sums=" 4f15f6cb4aee8adb07ed9baa7b6dff055aa334e204a53d49c23828f2c1247ec195a10f30d4a7477e3d9510c785cf8fcb7aeed2ab7a4f39136d7da58de103c3d5 py3-zimscraperlib-3.2.0.tar.gz "