makedeb


python3-pytubefix 6.6.2-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=6.6.2
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=('b01c6524439e1ec56c13e9919de3a7a48f5f727facf4222892e8f97b3f3a04e4aa9e4eccd573db6efdacdc75bc5ae78a79c256a40dd9b6d2806f20049f3a567b')

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/"
}