# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>

_realname=fastimport
pkgbase="python-${_realname}"
pkgname=("python-${_realname}")
pkgver=0.9.14
pkgrel=5
pkgdesc="VCS fastimport/fastexport parser"
arch=('any')
license=('spdx:GPL-2.0-or-later')
url="https://pypi.python.org/pypi/fastimport/"
msys2_references=(
  "purl: pkg:pypi/fastimport"
)
depends=('python')
makedepends=(
  "python-setuptools"
  "python-build"
  "python-installer"
)
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('6ac99dda4e7b0b3ae831507b6d0094802e6dd95891feafde8cc5c405b6c149ca')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"

  python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"

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