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

_pyname=editables
pkgname=python-editables
pkgver=0.5
pkgrel=2
pkgdesc='A Python library for creating editable wheels'
arch=(any)
url='https://github.com/pfmoore/editables'
msys2_references=(
  "purl: pkg:pypi/editables"
)
license=('spdx:MIT')
depends=('python')
makedepends=(
  'python-build'
  'python-installer'
  'python-flit-core'
)
source=(https://github.com/pfmoore/editables/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('1ff2663aa1669eb89115a38e2d4067c21bb847e7006f72bf979a1a91b8bc2304')

build() {
  cd $_pyname-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $_pyname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
}
