makedeb


python3-pytubefix 8.7.0-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="8.7.0"
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=('3f21e3da64897f73d5a8e8e31d987ebf48d9770eabc1fa88e42c2361499782e388ee27610cc0f4f4426bb8f05aadf3e9243711bdfbfa2557648ec267b9167b86')

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