From f3779d8d89298d84867e6c0110960eaf7b447668 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 16 Apr 2024 10:09:29 -0400 Subject: [PATCH] backports/py3-pytube: new aport --- backports/py3-pytube/APKBUILD | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 backports/py3-pytube/APKBUILD diff --git a/backports/py3-pytube/APKBUILD b/backports/py3-pytube/APKBUILD new file mode 100644 index 0000000..6d27b69 --- /dev/null +++ b/backports/py3-pytube/APKBUILD @@ -0,0 +1,42 @@ +# Contributor: Antoine Martin (ayakael) +# Maintainer: Antoine Martin (ayakael) +pkgname=py3-pytube +#_pkgreal is used by apkbuild-pypi to find modules at PyPI +_pkgreal=pytube +pkgver=15.0.0 +pkgrel=1 +pkgdesc="Python 3 library for downloading YouTube Videos." +url="https://pypi.python.org/project/pytube" +arch="noarch" +license="Unlicense" +checkdepends="py3-pytest" +makedepends="py3-setuptools py3-gpep517 py3-wheel" +source="$pkgname-$pkgver.tar.gz::https://github.com/pytube/pytube/archive/refs/tags/v$pkgver.tar.gz" +builddir="$srcdir/$_pkgreal-$pkgver" +subpackages="$pkgname-pyc" +# 7/131 units failing due to: +# AttributeError: 'NoneType' object has no attribute 'register_on_progress_callback' +# AttributeError: 'YouTube' object has no attribute 'stream_monostate' +# StopIteration +options="!check" + +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 "$builddir"/.dist/*.whl + .testenv/bin/python3 -m pytest -v +} + +package() { + python3 -m installer -d "$pkgdir" \ + .dist/*.whl +} + +sha512sums=" +fc28d87c56bae9da3def68224a03687cc521c26e6f38dd41abe81e84f91bb2cab73dc8c7dbbc388787cf066f7d7304c78162cc60c544b99e75187b760c64b4a3 py3-pytube-15.0.0.tar.gz +"