# Maintainer: atom2013 <atom.long@hotmail.com>

_realname=pyparsing
pkgbase="python-${_realname}"
pkgname=("python-${_realname}")
pkgver=3.2.5
pkgrel=1
pkgdesc='General parsing module for Python'
arch=('any')
url='https://github.com/pyparsing/pyparsing/'
msys2_changelog_url='https://github.com/pyparsing/pyparsing/blob/master/CHANGES'
msys2_references=(
  "anitya: 3756"
  "archlinux: python-pyparsing"
  "cygwin: python-pyparsing"
  "gentoo: dev-python/pyparsing"
  "purl: pkg:pypi/pyparsing"
)
license=('spdx:MIT')
depends=('python')
makedepends=(
  'python-flit-core'
  'python-installer'
)
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('2df8d5b7b2802ef88e8d016a2eb9c7aeaa923529cd251ed0fe4608275d4105b6')

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

  python -m flit_core.wheel
}

package() {
  cd pyparsing-${pkgver}

  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
