# Maintainer: Alexandre Ferreira < alex.jorge.m [at] gmail.com >

_realname=cython
pkgbase=${_realname}
pkgname=('cython')
pkgver=0.29.21
pkgrel=3
pkgdesc='C-Extensions for Python'
arch=('i686' 'x86_64')
url='https://cython.org/'
license=('APACHE')
depends=('python-setuptools')
makedepends=('gcc' 'python-devel')
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/cython/cython/archive/${pkgver}.tar.gz")
sha256sums=('e2e38e1f0572ca54d6085df3dec8b607d20e81515fb80215aed19c81e8fe2079')

prepare() {
  cd "${srcdir}"
  rm -rf python-build-${CARCH}| true
  cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
}

build() {
  cd "${srcdir}/python-build-${CARCH}"
  DISTUTILS_DEBUG=1 /usr/bin/python setup.py build
}

package() {
  cd "${srcdir}/python-build-${CARCH}"
  DISTUTILS_DEBUG=1 /usr/bin/python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}
