Date: Tuesday, November 30, 2021 @ 16:43:20 Author: foutrelis Revision: 1057841
archrelease: copy trunk to community-staging-any Added: python-setuptools-rust/repos/community-staging-any/ python-setuptools-rust/repos/community-staging-any/PKGBUILD (from rev 1057840, python-setuptools-rust/trunk/PKGBUILD) ----------+ PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) Copied: python-setuptools-rust/repos/community-staging-any/PKGBUILD (from rev 1057840, python-setuptools-rust/trunk/PKGBUILD) =================================================================== --- community-staging-any/PKGBUILD (rev 0) +++ community-staging-any/PKGBUILD 2021-11-30 16:43:20 UTC (rev 1057841) @@ -0,0 +1,42 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: codedust +# Contributor: Dario Ostuni <dario.ost...@gmail.com> +# Contributor: Clayton Craft <clayton at craftyguy dot net> + +pkgname=python-setuptools-rust +pkgver=0.12.1 +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") +sha512sums=('6cff0ad83026cbc548cc0fc20b7456e1555893b0fb670756409bc351ebaae7e2f4bad17c8379cad50120665669f409c14b35f80491c7d6f6ad9768b63cb7cf11') + +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.10" 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/ +}