Date: Thursday, April 6, 2023 @ 12:13:50
  Author: felixonmars
Revision: 1438648

archrelease: copy trunk to community-staging-any

Added:
  python-aws-xray-sdk/repos/community-staging-any/
  python-aws-xray-sdk/repos/community-staging-any/PKGBUILD
    (from rev 1438647, python-aws-xray-sdk/trunk/PKGBUILD)

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

Copied: python-aws-xray-sdk/repos/community-staging-any/PKGBUILD (from rev 
1438647, python-aws-xray-sdk/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-06 12:13:50 UTC (rev 1438648)
@@ -0,0 +1,78 @@
+# Maintainer: Chih-Hsuan Yen <[email protected]>
+# Contributor: Guillaume Horel <[email protected]>
+
+pkgname=python-aws-xray-sdk
+_pkgname=aws-xray-sdk-python
+pkgver=2.12.0
+_commit=c57d293198251e276988440400140ac247c24606
+pkgrel=2
+pkgdesc='AWS X-Ray SDK for Python'
+arch=(any)
+url='https://github.com/aws/aws-xray-sdk-python'
+license=(Apache)
+depends=(python python-botocore python-wrapt)
+# See extensions in 
https://github.com/aws/aws-xray-sdk-python/tree/master/aws_xray_sdk/ext
+optdepends=(python-aiobotocore python-aiohttp python-bottle python-django
+            python-flask python-flask-sqlalchemy python-httpx 
python-mysql-connector
+            python-pg8000 python-psycopg2 python-pymongo python-pymysql
+            python-pynamodb python-requests python-sqlalchemy)
+makedepends=(git python-setuptools ${optdepends[@]})
+checkdepends=(python-pytest python-pytest-asyncio python-testing.postgresql
+              python-webtest python-django-fake-model python-pytest-benchmark)
+source=("git+https://github.com/aws/aws-xray-sdk-python.git#commit=$_commit";)
+sha256sums=('SKIP')
+
+_backports=(
+)
+
+pkgver() {
+  cd $_pkgname
+  git describe --tags | sed 's/^v//;s/-/+/g'
+}
+
+prepare() {
+  cd $_pkgname
+
+  # this loop is stolen from core/systemd :)
+  local _c
+  for _c in "${_backports[@]}"; do
+    git log --oneline -1 "${_c}"
+    git cherry-pick -n "${_c}"
+  done
+
+  cat > pytest.ini <<EOF
+[pytest]
+asyncio_mode = auto
+EOF
+}
+
+build() {
+  cd $_pkgname
+  python setup.py build
+}
+
+check() {
+  cd $_pkgname
+
+  # See setenv= in upstream tox.ini
+  export DJANGO_SETTINGS_MODULE=tests.ext.django.app.settings
+  export AWS_SECRET_ACCESS_KEY=fake_key
+  export AWS_ACCESS_KEY_ID=fake_id
+
+  # * the test suite for aiohttp uses test_client fixture, which is
+  #   dropped in the latest pytest-aiohttp
+  # * the test suite for pymysql uses testing.mysqld, which is not
+  #   compatible with MariaDB [1]
+  # * tests fail with pg8000 > 1.20.0 and upstream explicitly
+  #   states no support [2]
+  # [1] https://github.com/tk0miya/testing.mysqld/issues/3
+  # [2] https://github.com/aws/aws-xray-sdk-python/pull/324
+  pytest -v tests --ignore tests/ext/aiohttp \
+                  --ignore tests/ext/pg8000 \
+                  --ignore tests/ext/pymysql
+}
+
+package() {
+  cd $_pkgname
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+}

Reply via email to