# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>

_pkgname=mdit-py-plugins
pkgname=python-mdit_py_plugins
pkgver=0.4.0
pkgrel=2
pkgdesc='Collection of core plugins for markdown-it-py'
arch=('any')
url='https://github.com/executablebooks/mdit-py-plugins'
license=('MIT')
depends=('python-markdown-it-py')
makedepends=('python-build' 'python-installer' 'python-flit-core')
checkdepends=('python-pytest' 'python-pytest-regressions')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('cdcce7a3819120923b7725daae0bf7a833c4da4487c49ff1a067fecf7d5e8f7a7be2fae03f3b821c766d7d6ebed4a298755ad5edb00adf73300a76a5663d67d6')

build() {
  cd $_pkgname-$pkgver

  python -m build -wn
}

check() {
  cd $_pkgname-$pkgver

  python -m pytest
}

package() {
  cd $_pkgname-$pkgver

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

  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

# vim:set ts=2 sw=2 et:
