# Maintainer: pkgname=py3-awscrt pkgver=0.17.0 pkgrel=1 pkgdesc="Python bindings for the AWS Common Runtime" url="https://github.com/awslabs/aws-crt-python" # s390x: big endian is explicitly unsupported # arm*, ppc64le: aws-crt-cpp arch="all !armhf !armv7 !ppc64le !s390x" license="Apache-2.0" # use the cpp one to just pull the aws stack makedepends=" aws-crt-cpp-dev openssl-dev py3-gpep517 py3-setuptools py3-wheel python3-dev samurai " checkdepends="py3-websockets" subpackages="$pkgname-pyc" source="$pkgname-$pkgver.tar.gz::https://github.com/awslabs/aws-crt-python/archive/refs/tags/v$pkgver.tar.gz" builddir="$srcdir/aws-crt-python-$pkgver" options="net" # tests need internet case "$CARCH" in arm*|aarch64|ppc64le) # too slow at running tests / fix later options="$options !check" ;; esac prepare() { default_prepare # by default it's just 1.0.0.dev0 echo "__version__ = '$pkgver'" >> awscrt/__init__.py # dynlink sed -i '/:lib/d' setup.py } build() { export AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO=1 gpep517 build-wheel \ --wheel-dir .dist \ --output-fd 3 3>&1 >&2 } check() { python3 -m venv --clear --without-pip --system-site-packages .testenv .testenv/bin/python3 -m installer .dist/*.whl .testenv/bin/python3 -m unittest discover test } package() { python3 -m installer -d "$pkgdir" \ .dist/*.whl } sha512sums=" a4eecaab12e625185a6541058513b66b9958e4d044bebc98c0d6a4f9421a523b98150ec73464ebe718fffd5cb233bd54012cbd5364f48bc4799b11932fd326dc py3-awscrt-0.17.0.tar.gz "