Date: Wednesday, October 19, 2022 @ 16:30:16
  Author: yan12125
Revision: 1332881

python-awscrt: new package, dependency for upcoming aws-cli-v2 and optional 
dependency for several other packages

Added:
  python-awscrt/
  python-awscrt/trunk/
  python-awscrt/trunk/PKGBUILD

----------+
 PKGBUILD |   41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

Added: python-awscrt/trunk/PKGBUILD
===================================================================
--- python-awscrt/trunk/PKGBUILD                                (rev 0)
+++ python-awscrt/trunk/PKGBUILD        2022-10-19 16:30:16 UTC (rev 1332881)
@@ -0,0 +1,41 @@
+# Maintainer: Chih-Hsuan Yen <[email protected]>
+# Contributor: TheEdgeOfRage on AUR
+
+_pkgname=aws-crt-python
+pkgname=python-awscrt
+# https://github.com/awslabs/aws-crt-python/releases
+pkgver=0.14.7
+pkgrel=1
+pkgdesc='A common runtime for AWS Python projects'
+arch=(x86_64)
+url='https://github.com/awslabs/aws-crt-python'
+license=(Apache)
+depends=(glibc python
+         aws-c-auth aws-c-cal aws-c-common aws-c-event-stream aws-c-http 
aws-c-io aws-c-mqtt aws-c-s3 aws-checksums)
+makedepends=(cmake python-build python-installer python-setuptools 
python-wheel)
+source=("https://github.com/awslabs/aws-crt-python/archive/v$pkgver/$pkgname-$pkgver.tar.gz";)
+sha256sums=('e608c46542e1076d00a7270657ddeea726893cb02f38f3c544c2f18643e0ca83')
+
+prepare() {
+  cd $_pkgname-$pkgver
+  # Allow linking to shared libraries
+  sed -i '/:lib/d' setup.py
+}
+
+build() {
+  cd $_pkgname-$pkgver
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  cd $_pkgname-$pkgver
+
+  pyver=$(python -c "import sys; print('{}{}'.format(*sys.version_info[:2]))")
+  export PYTHONPATH="$PWD:$PWD/build/lib.linux-$CARCH-cpython-$pyver"
+  python -m unittest discover test
+}
+
+package() {
+  cd $_pkgname-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+}

Reply via email to