name='python3-setuptools-rust' version='1.10.1' release='1' desc='Compile and distribute Python extensions written in rust as easily as if they were written in C.' homepage='https://github.com/PyO3/setuptools-rust' maintainer_ru='Евгений Храмов ' architectures=('all') license=('MIT') provides=('setuptools-rust') conflicts=('setuptools-rust') deps=( 'rust' 'python3-setuptools' 'python3-semantic-version' ) build_deps=( 'git' 'python3-build' 'python3-installer' 'python3-wheel' 'python3-setuptools-scm' ) build_deps_almalinux=( 'git' 'python3-build' 'python3-installer' 'python3-setuptools-wheel' 'python3-setuptools-scm' ) sources=("git+https://github.com/PyO3/setuptools-rust.git#tag=v$version") checksums=('SKIP') build() { cd setuptools-rust python -m build -nw } check() { cd setuptools-rust local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') for _dir in examples/*; do pushd $_dir PYTHONPATH="$PWD/../.." python -m build -nw python -m installer -d tmp_install dist/*.whl [[ -d tests || -d test ]] && PYTHONPATH="$PWD/tmp_install/usr/lib/python$python_version/site-packages" pytest tests popd done pytest --doctest-modules setuptools_rust } package() { cd setuptools-rust python -m installer -d "$pkgdir" dist/*.whl install-license LICENSE ./python-setuptools-rust/LICENSE }