# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>
# Contributor: Aaron DeVore <aaron.devore@gmail.com>
# Contributor: David Moore <davidm@sjsoft.com>

pkgname=python-xlwt
pkgver=1.3.0
pkgrel=12
pkgdesc='Library to create spreadsheet files compatible with Excel 97/2000/XP/2003 XLS files'
arch=(any)
url='https://python-excel.org'
license=('BSD-3-Clause AND BSD-4-Clause AND LGPL-2.1-or-later')
depends=(python)
makedepends=(
  git
  python-build
  python-installer
  python-setuptools
  python-wheel
)
source=("$pkgname::git+https://github.com/python-excel/xlwt#tag=$pkgver")
sha512sums=('943cf76735217e0ad0fe3d7dbfe3ad5aebc082debab03b4ff24bb112f357a7205ecf01509f445ee975a82079759965091f7af734c34ca68577f7978c21fa9ac1')
b2sums=('a6982ad4e3c55ab264de25f1b0c8c7d8f0e36e1246376353a2621ab33edfaa2a2581dbee55e7a9755cddab0d00f5fc4b27a4f1e861183ad31b5c59c4bac86903')

build() {
  cd "$pkgname"

  python -m build --wheel --no-isolation
}

package() {
  cd "$pkgname"

  python -m installer --destdir="$pkgdir" dist/*.whl

  # license
  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" docs/licenses.rst
}
