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

pkgname=python-semantic-version
pkgver=2.10.0
pkgrel=1
pkgdesc="A library implementing the 'SemVer' scheme."
url="https://github.com/rbarrois/python-semanticversion"
license=('spdx:BSD-2-Clause')
msys2_references=(
  'purl: pkg:pypi/semantic-version'
)
arch=('any')
depends=('python')
makedepends=(
  'python-setuptools'
  'python-build'
  'python-installer'
)
source=("https://github.com/rbarrois/python-semanticversion/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('e234480908f633d2d80fdd97e87699135b2ed2fc9876b7f41d1d4a2d3262a0c4')

build() {
  cd "python-semanticversion-$pkgver"

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

package() {
  cd "python-semanticversion-$pkgver"

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