makedeb


python3-pytube-git 15.0.0.r1.a32fff3-1


Lightweight, Python library and cli for downloading YouTube videos.

Viewing /PKGBUILD.

View raw.

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

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
_pkgname=pytube
pkgname=python3-pytube-git
pkgver=15.0.0.r1.a32fff3
pkgrel=1
pkgdesc="Lightweight, Python library and cli for downloading YouTube videos."
arch=('all')
license=('Unlicense')
depends=('python3')
makedepends=('git' 'python3-build' 'python3-installer' 'python3-wheel')
source=("git+https://github.com/pytube/pytube")
b2sums=(SKIP)
provides=('python3-pytube')
conflicts=('python3-pytube')

pkgver() {
  cd "$srcdir/${_pkgname}"
  printf "%s.r%s.%s" "$(grep ^Version: pytube.egg-info/PKG-INFO | cut -d ' ' -f 2)" "$(git rev-list --count HEAD)" "$(git describe --long --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g')"
}

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

package() {
  cd $srcdir/${_pkgname}
  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/"
}