makedeb


python3-pytubefix 5.6.3-0


Lightweight, Python library and cli for downloading YouTube videos, fork of pytube.

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for python3-pytubefix.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
_pkgname=pytubefix
pkgname=python3-pytubefix
pkgver=5.6.3
pkgrel=0
pkgdesc="Lightweight, Python library and cli for downloading YouTube videos, fork of pytube."
arch=('all')
license=('MIT')
depends=('python3')
makedepends=('python3-build' 'python3-installer' 'python3-wheel')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/JuanBindez/pytubefix/archive/refs/tags/v${pkgver}.tar.gz")
b2sums=('93467e7a907034de0c6183209179bed176d0c14ceab040de18a40b12482f13b5e37feb8cde05d9132e85c6060029c6a7482bc467c3394b3a774ae3772d53a374')

prepare(){
  cd "$srcdir/${_pkgname}-${pkgver}"
  # setuptools 67.4.0 is too high
  sed -i 's!setuptools>=67.4.0!setuptools>=0.0.0!' pyproject.toml
}

build(){
  cd "$srcdir/${_pkgname}-${pkgver}"
  python3 -m build --no-isolation --wheel
}

package() {
  cd $srcdir/${_pkgname}-${pkgver}
  python3 -m installer --destdir="$pkgdir" dist/*.whl #--optimize=1 --skip-build
  # Manual remove local
  mv "$pkgdir/usr/local/"* "$pkgdir/usr/"
  rmdir "$pkgdir/usr/local" 
  #doc
  install -Dm644 "README.md" "$pkgdir/usr/share/doc/$_pkgname/readme"
  install -Dm644 LICENSE "$pkgdir/usr/share/doc/$_pkgname/"
}