| 1 | maintainer="Achill Gilgenast <[email protected]>" |
| 2 | pkgname=py3-awscrt |
| 3 | pkgver=0.37.0 |
| 4 | pkgrel=0 |
| 5 | pkgdesc="Python bindings for the AWS Common Runtime" |
| 6 | url="https://github.com/awslabs/aws-crt-python" |
| 7 | arch="all" |
| 8 | license="Apache-2.0" |
| 9 | # use the cpp one to just pull the aws stack |
| 10 | makedepends=" |
| 11 | aws-crt-cpp-dev |
| 12 | openssl-dev |
| 13 | py3-gpep517 |
| 14 | py3-setuptools |
| 15 | py3-wheel |
| 16 | python3-dev |
| 17 | samurai |
| 18 | " |
| 19 | checkdepends="py3-websockets" |
| 20 | subpackages="$pkgname-pyc" |
| 21 | source="$pkgname-$pkgver.tar.gz::https://github.com/awslabs/aws-crt-python/archive/refs/tags/v$pkgver.tar.gz" |
| 22 | builddir="$srcdir/aws-crt-python-$pkgver" |
| 23 | options="!check" # bogus tests that need internet |
| 24 | |
| 25 | case "$CARCH" in |
| 26 | arm*|aarch64|ppc64le|loongarch64) |
| 27 | # too slow at running tests / fix later |
| 28 | options="$options !check" |
| 29 | ;; |
| 30 | esac |
| 31 | prepare() { |
| 32 | default_prepare |
| 33 | |
| 34 | # by default it's just 1.0.0.dev0 |
| 35 | echo "__version__ = '$pkgver'" >> awscrt/__init__.py |
| 36 | } |
| 37 | |
| 38 | build() { |
| 39 | export AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO=1 |
| 40 | gpep517 build-wheel \ |
| 41 | --wheel-dir .dist \ |
| 42 | --output-fd 3 3>&1 >&2 |
| 43 | } |
| 44 | |
| 45 | check() { |
| 46 | python3 -m venv --clear --without-pip --system-site-packages .testenv |
| 47 | .testenv/bin/python3 -m installer .dist/*.whl |
| 48 | .testenv/bin/python3 -m unittest discover test |
| 49 | } |
| 50 | |
| 51 | package() { |
| 52 | python3 -m installer -d "$pkgdir" \ |
| 53 | .dist/*.whl |
| 54 | } |
| 55 | |
| 56 | sha512sums=" |
| 57 | 5591cba765394c075ef01106358a899f73527de826116d6e5e3d8f5fd444926b864356f1e20aae5dc6b537c3de3798e12344b3e62fbfff53e0e5d94f89f941ff py3-awscrt-0.37.0.tar.gz |
| 58 | " |