# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: codedust
# Contributor: Dario Ostuni <dario.ostuni@gmail.com>
# Contributor: Clayton Craft <clayton at craftyguy dot net>

# Included in Slint by Didier Spaier didieratslintdotfr

pkgname=python-setuptools-rust
pkgver=0.11.6
pkgrel=2slint
slackdesc="$pkgname (compile Python extensions written in rust.)"
license=('MIT')
url="https://github.com/PyO3/setuptools-rust"
depends=('rust' 'python-setuptools' 'python-semantic-version' 'python-toml')
makedepends=('python-setuptools-scm' 'python-wheel')
checkdepends=('python-pytest' 'python-pytest-benchmark' 'python-beautifulsoup4' 'python-lxml' 'python-cffi')
source=("https://github.com/PyO3/setuptools-rust/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('0c22494070035f43b8b1578dc28d247e3efaeea401fd67b7d062ebc5ce800786')

export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver

build() {
  cd setuptools-rust-$pkgver
  python3 setup.py build
  python3 setup.py install --root="$PKG" --optimize=1
  install -Dm644 LICENSE -t "$PKG"/usr/doc/$pkgname_$pkgver/
}
