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

pkgbase=python-six
pkgname=('python-six')
pkgver=1.17.0
pkgrel=1
provides=("python3-six")
replaces=("python3-six")
conflicts=("python3-six")
pkgdesc="Python compatibility utilities"
arch=('any')
url="https://pypi.python.org/pypi/six/"
msys2_references=(
  "anitya: 4027"
  "purl: pkg:pypi/six"
)
license=('spdx:MIT')
depends=('python')
makedepends=(
  "python-setuptools"
  "python-build"
  "python-installer"
)
checkdepends=('python-pytest')
source=("https://pypi.io/packages/source/s/six/six-${pkgver}.tar.gz")
sha256sums=('ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81')

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

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

check() {
  cd "${srcdir}"/six-${pkgver}
  py.test
}

package() {
  cd six-${pkgver}

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