Date: Monday, February 8, 2021 @ 12:20:05 Author: felixonmars Revision: 848944
addpkg: python-setuptools-rust 0.11.6-2 Added: python-setuptools-rust/ python-setuptools-rust/repos/ python-setuptools-rust/trunk/ python-setuptools-rust/trunk/PKGBUILD ----------+ PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) Added: python-setuptools-rust/trunk/PKGBUILD =================================================================== --- python-setuptools-rust/trunk/PKGBUILD (rev 0) +++ python-setuptools-rust/trunk/PKGBUILD 2021-02-08 12:20:05 UTC (rev 848944) @@ -0,0 +1,42 @@ +# Maintainer: Felix Yan <[email protected]> +# Contributor: codedust +# Contributor: Dario Ostuni <[email protected]> +# Contributor: Clayton Craft <clayton at craftyguy dot net> + +pkgname=python-setuptools-rust +pkgver=0.11.6 +pkgrel=2 +pkgdesc="Compile and distribute Python extensions written in rust as easily as if they were written in C." +arch=('any') +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 + python setup.py build +} + +check() { + cd setuptools-rust-$pkgver + python setup.py egg_info + for _dir in examples/*; do + pushd $_dir + PYTHONPATH="$PWD/../.." python setup.py build + [[ -d tests || -d test ]] && PYTHONPATH="$PWD/build/lib:build/lib.linux-$CARCH-3.9" pytest + popd + done +} + +package() { + cd setuptools-rust-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 + + install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ +}
