pkgname=python-cryptography pkgver=44.0.0 pkgrel=1 pkgdesc="A package designed to expose cryptographic recipes and primitives to Python developers" arch=('x86_64') url="https://github.com/pyca/cryptography" license=('Apache-2.0 OR BSD-3-Clause') depends=('gcc-libs' 'glibc' 'openssl' 'python' 'python-cffi') makedepends=( 'clang' 'lld' 'llvm' 'python-build' 'python-installer' 'python-maturin' 'python-setuptools' 'python-wheel' ) source=(https://github.com/pyca/cryptography/archive/${pkgver}/${pkgname#*-}-${pkgver}.tar.gz) sha256sums=(b2232d62504ba4cca97136582e86564ac75ec1124dfddb19d83f0eb26548d18d) prepare() { cd ${pkgname#*-}-${pkgver} # Drop all benchmark tests, this means we don't have to checkdepends on # pytest-benchmark nor are benchmark tests interesting for a distribution. rm -rf tests/bench } build() { cd ${pkgname#*-}-${pkgver} # echo $RUSTFLAGS # CC=clang RUSTFLAGS+="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld" \ python3 -m build --wheel --skip-dependency-check --no-isolation } package() { cd ${pkgname#*-}-${pkgver} python3 -m installer -d ${pkgdir} dist/*.whl }