# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=sagetex
pkgver=3.6.1
pkgrel=6
pkgdesc='Allows to embed code, results of computations, and plots from SageMath into LaTeX documents'
arch=(any)
url='https://github.com/sagemath/sagetex'
license=(GPL2)
depends=(sagemath
         texlive-latexrecommended)
makedepends=(python-build
             python-installer
             python-setuptools
             python-wheel)
source=(https://github.com/sagemath/sagetex/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('c05f5c6470afdede829d9f9ff10a6bbe9452e5af130d4a14a4b3bc1238f140f4')

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

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