# Maintainer: Butui Hu <hot123tea123@gmail.com>

_pkgname=gdown
pkgname=gdown
pkgver=6.1.0
pkgrel=1
pkgdesc='Download a large file from Google Drive'
arch=('any')
url='https://github.com/wkentaro/gdown'
license=('MIT')
depends=(
  python-beautifulsoup4
  python-filelock
  python-pysocks
  python-requests
  python-six
  python-tqdm
)
makedepends=(
  python-build
  python-hatch-fancy-pypi-readme
  python-hatch-vcs
  python-hatchling
  python-installer
  python-setuptools
  python-wheel
)
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/wkentaro/gdown/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('40aa1267e30406c39884f7563d86c6761fd1f1a444bfffb06c74d481c541b29ca6d4f58a9afc2b2728cb01a718e6e6917b28f5e93e57958892648abae239e242')

build() {
  cd "${_pkgname}-${pkgver}"
  SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} \
  python -m build --wheel --no-isolation
}

package() {
  cd "${_pkgname}-${pkgver}"
  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
# vim:set ts=2 sw=2 et:
