# Maintainer: Hu Butui <hot123tea123@gmail.com>
# Contributor: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: Simon Legner <Simon.Legner@gmail.com>

_pkgname=rasterio
pkgname=python-rasterio
pkgver=1.5.1
pkgrel=2
pkgdesc="Fast and direct raster I/O for use with Numpy and SciPy"
url="https://github.com/rasterio/rasterio"
license=('LicenseRef-rasterio')
arch=('x86_64')
depends=(
  gcc-libs
  gdal
  glibc
  python-affine
  python-attrs
  python-certifi
  python-click
  python-numpy
  python-pyparsing
  python-snuggs
)
makedepends=(
  cython
  python-build
  python-installer
  python-setuptools
  python-wheel
)
optdepends=('ipython: for ipython support'
  'python-boto3: for s3 support'
  'python-matplotlib: for plotting support'
  'python-swiftclient: for OpenStack support')
source=(${_pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz)
sha512sums=('894106fa8c452fbe297a53c30e0d7ff080379788e1ef5e4996d751c34f403eafec802ef0ba86639243ce82ac235f7e383d43246eef0856075a1f743f60ce12f6')

build() {
  cd ${_pkgname}-${pkgver}
  python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
  cd ${_pkgname}-${pkgver}
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
# vim:set ts=2 sw=2 et:
