From 8d3b6b0c99d8fbfa99d4495fb986f15a0aaadbc6 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Sep 2024 12:51:19 -0400 Subject: [PATCH 1/9] ilot/py3-pg8000: new aport --- ilot/py3-pg8000/APKBUILD | 40 ++++++++++++++++++++ ilot/py3-pg8000/use-local-version-file.patch | 19 ++++++++++ 2 files changed, 59 insertions(+) create mode 100644 ilot/py3-pg8000/APKBUILD create mode 100644 ilot/py3-pg8000/use-local-version-file.patch diff --git a/ilot/py3-pg8000/APKBUILD b/ilot/py3-pg8000/APKBUILD new file mode 100644 index 0000000..92b0b75 --- /dev/null +++ b/ilot/py3-pg8000/APKBUILD @@ -0,0 +1,40 @@ +# Contributor: Antoine Martin (ayakael) +# Maintainer: Antoine Martin (ayakael) +pkgname=py3-pg8000 +#_pkgreal is used by apkbuild-pypi to find modules at PyPI +_pkgreal=pg8000 +pkgver=1.31.2 +pkgrel=0 +pkgdesc="Pure-Python PostgreSQL Driver" +url="https://pypi.python.org/project/pg8000" +arch="noarch" +license="BSD-3-Clause" +depends="py3-scramp py3-dateutil" +checkdepends="py3-pytest" +makedepends="py3-setuptools py3-gpep517 py3-wheel py3-hatchling" +source="$pkgname-$pkgver.tar.gz::https://github.com/tlocke/pg8000/archive/refs/tags/$pkgver.tar.gz" +options="!check" # TODO required postgresql db +builddir="$srcdir/$_pkgreal-$pkgver" +subpackages="$pkgname-pyc" + +build() { + echo "__version__ = \"$pkgver\"" > _version.py + 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 pytest -v +} + +package() { + python3 -m installer -d "$pkgdir" \ + .dist/*.whl +} + +sha512sums=" +f04d4aaf3dcaf244e223a093b42473a723de718eeeee648d07f6e3d061f9783c4dff23ff120a1399ab8dd951dee2cf836dd4c7185668cc516f390b293ee72adb py3-pg8000-1.31.2.tar.gz +" diff --git a/ilot/py3-pg8000/use-local-version-file.patch b/ilot/py3-pg8000/use-local-version-file.patch new file mode 100644 index 0000000..051d762 --- /dev/null +++ b/ilot/py3-pg8000/use-local-version-file.patch @@ -0,0 +1,19 @@ +diff --git a/pyproject.toml.orig b/pyproject.toml +index c3db28f..5a8a017 100644 +--- a/pyproject.toml.orig ++++ b/pyproject.toml +@@ -40,13 +40,7 @@ dynamic = ["version"] + Homepage = "https://github.com/tlocke/pg8000" + + [tool.hatch.version] +-source = "versioningit" +- +-[tool.versioningit] +- +-[tool.versioningit.vcs] +-method = "git" +-default-tag = "0.0.0" ++path = "_version.py" + + [tool.flake8] + application-names = ['pg8000'] From ddcd833b5ae47594b5ab3f64b3558ae4b17b6c1e Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Sep 2024 12:52:02 -0400 Subject: [PATCH 2/9] ilot/py3-scramp: new aport --- ilot/py3-scramp/APKBUILD | 39 +++++++++++++++++++++ ilot/py3-scramp/use-local-version-src.patch | 36 +++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 ilot/py3-scramp/APKBUILD create mode 100644 ilot/py3-scramp/use-local-version-src.patch diff --git a/ilot/py3-scramp/APKBUILD b/ilot/py3-scramp/APKBUILD new file mode 100644 index 0000000..916b7a1 --- /dev/null +++ b/ilot/py3-scramp/APKBUILD @@ -0,0 +1,39 @@ +# Contributor: Antoine Martin (ayakael) +# Maintainer: Antoine Martin (ayakael) +pkgname=py3-scramp +#_pkgreal is used by apkbuild-pypi to find modules at PyPI +_pkgreal=scramp +pkgver=1.4.5 +pkgrel=0 +pkgdesc="Python implementation of the SCRAM protocol" +url="https://pypi.python.org/project/scramp" +arch="noarch" +license="MIT" +depends="py3-asn1crypto" +checkdepends="py3-pytest py3-passlib py3-pytest-mock" +makedepends="py3-setuptools py3-gpep517 py3-wheel py3-hatchling" +source="$pkgname-$pkgver.tar.gz::https://github.com/tlocke/scramp/archive/refs/tags/$pkgver.tar.gz" +builddir="$srcdir/$_pkgreal-$pkgver" +subpackages="$pkgname-pyc" + +build() { + echo "__version__ = \"$pkgver\"" > _version.py + 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 pytest -v +} + +package() { + python3 -m installer -d "$pkgdir" \ + .dist/*.whl +} + +sha512sums=" +070bf5b92f45bd506cb0f6aeb4ff7fccfff9092b69bed20338a2cfdf84f5587b9162fa1ffb84db8c98ea5f3e008f34db5848690d857110e1d037bb15d2a95d58 py3-scramp-1.4.5.tar.gz +" diff --git a/ilot/py3-scramp/use-local-version-src.patch b/ilot/py3-scramp/use-local-version-src.patch new file mode 100644 index 0000000..4ad0785 --- /dev/null +++ b/ilot/py3-scramp/use-local-version-src.patch @@ -0,0 +1,36 @@ +diff --git a/pyproject.toml.orig b/pyproject.toml +index d79fac8..09bea8c 100644 +--- a/pyproject.toml.orig ++++ b/pyproject.toml +@@ -1,5 +1,5 @@ + [build-system] +-requires = ["hatchling", "versioningit"] ++requires = ["hatchling", "setuptools_scm"] + build-backend = "hatchling.build" + + [project] +@@ -30,18 +30,15 @@ dependencies = [ + ] + dynamic = ["version"] + ++[tool.setuptools_scm] ++write_to = "_version.py" ++ ++[tool.hatch.version] ++path = "_version.py" ++ + [project.urls] + Homepage = "https://github.com/tlocke/scramp" + +-[tool.hatch.version] +-source = "versioningit" +- +-[tool.versioningit] +- +-[tool.versioningit.vcs] +-method = "git" +-default-tag = "0.0.0" +- + [tool.flake8] + application-names = ["scramp"] + ignore = ["E203", "W503"] From 23492e9b4d76e2982c8310f2aa4613c3b4720ffe Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Sep 2024 12:52:15 -0400 Subject: [PATCH 3/9] ilot/py3-testing-common-fatabase: new aport --- .../25_support-callable-in-collections.patch | 37 +++++++++++++++++++ ilot/py3-testing-common-database/APKBUILD | 37 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 ilot/py3-testing-common-database/25_support-callable-in-collections.patch create mode 100644 ilot/py3-testing-common-database/APKBUILD diff --git a/ilot/py3-testing-common-database/25_support-callable-in-collections.patch b/ilot/py3-testing-common-database/25_support-callable-in-collections.patch new file mode 100644 index 0000000..de66056 --- /dev/null +++ b/ilot/py3-testing-common-database/25_support-callable-in-collections.patch @@ -0,0 +1,37 @@ +From fa31191abe883d0ddc2a441550eeacc4126c85cb Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Sat, 18 Dec 2021 10:32:19 -0500 +Subject: [PATCH] Support Callable in collections.abc + +The abstract base classes are available here in Python 3.3+, and +in current Python versions they are no longer available directly +in collections. +--- + src/testing/common/database.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/testing/common/database.py b/src/testing/common/database.py +index 5ba8c5e..74e1067 100644 +--- a/src/testing/common/database.py ++++ b/src/testing/common/database.py +@@ -23,7 +23,10 @@ + from time import sleep + from shutil import copytree, rmtree + from datetime import datetime +-import collections ++try: ++ from collections.abc import Callable ++except ImportError: ++ from collections import Callable + + + class DatabaseFactory(object): +@@ -285,7 +288,7 @@ def decorator(fn, path=arg): + + return skipIf(cond, "%s not found" % self.name)(fn) + +- if isinstance(arg, collections.Callable): # execute as simple decorator ++ if isinstance(arg, Callable): # execute as simple decorator + return decorator(arg, None) + else: # execute with path argument + return decorator diff --git a/ilot/py3-testing-common-database/APKBUILD b/ilot/py3-testing-common-database/APKBUILD new file mode 100644 index 0000000..8593440 --- /dev/null +++ b/ilot/py3-testing-common-database/APKBUILD @@ -0,0 +1,37 @@ +# Contributor: Antoine Martin (ayakael) +# Maintainer: Antoine Martin (ayakael) +pkgname=py3-testing-common-database +#_pkgreal is used by apkbuild-pypi to find modules at PyPI +_pkgreal=testing.common.database +pkgver=2.0.3 +pkgrel=0 +pkgdesc="testing.common.database is utilities for testing.* package." +url="https://pypi.python.org/project/pyrad" +arch="noarch" +license="BSD-3-Clause" +depends="python3" +checkdepends="py3-unittest2" +makedepends="py3-setuptools py3-gpep517 py3-wheel" +source=" + $pkgname-$pkgver.tar.gz::https://github.com/tk0miya/testing.common.database/archive/refs/tags/$pkgver.tar.gz + 25_support-callable-in-collections.patch + " +options="!check" # No testsuite +builddir="$srcdir/$_pkgreal-$pkgver" +subpackages="$pkgname-pyc" + +build() { + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 +} + +package() { + python3 -m installer -d "$pkgdir" \ + .dist/*.whl +} + +sha512sums=" +d63df9a16ca518645f53516f4ab1c8e3bd539cd3d60471678c1b2dbe1b33a84587a93ae095bd0e46157581139921b3865b3ce5eb25efcefdf05cf65a6947f33c py3-testing-common-database-2.0.3.tar.gz +3ccb5977103d5703887cbddf58a70dfb262cc233c06e60b61178ca85fa69851fedc7c110141e3e98f838a38911fcf151b64e60224d9aff3ddf46849db4d81de3 25_support-callable-in-collections.patch +" From 9d314e462da7f074a94082a9caad00fac3a38765 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Sep 2024 12:52:31 -0400 Subject: [PATCH 4/9] ilot/py3-testing-postgresql: new aport --- .../44_replace-assert-regeexp-matches.patch | 34 +++++++++++++++ ilot/py3-testing-postgresql/APKBUILD | 42 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 ilot/py3-testing-postgresql/44_replace-assert-regeexp-matches.patch create mode 100644 ilot/py3-testing-postgresql/APKBUILD diff --git a/ilot/py3-testing-postgresql/44_replace-assert-regeexp-matches.patch b/ilot/py3-testing-postgresql/44_replace-assert-regeexp-matches.patch new file mode 100644 index 0000000..82ad198 --- /dev/null +++ b/ilot/py3-testing-postgresql/44_replace-assert-regeexp-matches.patch @@ -0,0 +1,34 @@ +From ec9ce743a0f51076d7ea2485a6fa58b72ec8e338 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Fri, 4 Aug 2023 10:58:08 -0400 +Subject: [PATCH] Replace assertRegexpMatches() with assertRegex() + +This alias was deprecated in Python 3.2 and is removed in Python 3.12. + +Reference: https://docs.python.org/3.12/whatsnew/3.12.html +--- + tests/test_postgresql.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py +index 1fa1116..b2bba20 100644 +--- a/tests/test_postgresql.py ++++ b/tests/test_postgresql.py +@@ -28,7 +28,7 @@ def test_basic(self): + # connect to postgresql (w/ psycopg2) + conn = psycopg2.connect(**pgsql.dsn()) + self.assertIsNotNone(conn) +- self.assertRegexpMatches(pgsql.read_bootlog(), 'is ready to accept connections') ++ self.assertRegex(pgsql.read_bootlog(), 'is ready to accept connections') + conn.close() + + # connect to postgresql (w/ sqlalchemy) +@@ -38,7 +38,7 @@ def test_basic(self): + # connect to postgresql (w/ pg8000) + conn = pg8000.connect(**pgsql.dsn()) + self.assertIsNotNone(conn) +- self.assertRegexpMatches(pgsql.read_bootlog(), 'is ready to accept connections') ++ self.assertRegex(pgsql.read_bootlog(), 'is ready to accept connections') + conn.close() + finally: + # shutting down diff --git a/ilot/py3-testing-postgresql/APKBUILD b/ilot/py3-testing-postgresql/APKBUILD new file mode 100644 index 0000000..05a0f0f --- /dev/null +++ b/ilot/py3-testing-postgresql/APKBUILD @@ -0,0 +1,42 @@ +# Contributor: Antoine Martin (ayakael) +# Maintainer: Antoine Martin (ayakael) +pkgname=py3-testing-postgresql +#_pkgreal is used by apkbuild-pypi to find modules at PyPI +_pkgreal=testing.postgresql +pkgver=1.3.0 +pkgrel=0 +pkgdesc="Automatically setups a postgresql instance in a temporary directory, and destroys it after testing" +url="https://pypi.python.org/project/testing.postgresql" +arch="noarch" +license="Apache-2.0" +depends="py3-testing-common-database py3-pg8000 postgresql" +checkdepends="py3-pytest py3-psycopg2 py3-sqlalchemy" +makedepends="py3-setuptools py3-gpep517 py3-wheel" +source=" + $pkgname-$pkgver.tar.gz::https://github.com/tk0miya/testing.postgresql/archive/refs/tags/$pkgver.tar.gz + 44_replace-assert-regeexp-matches.patch + " +builddir="$srcdir/$_pkgreal-$pkgver" +subpackages="$pkgname-pyc" + +build() { + 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 pytest -v +} + +package() { + python3 -m installer -d "$pkgdir" \ + .dist/*.whl +} + +sha512sums=" +7b907e4c11c67eb6a2e936e6b96fb90747dfe14d92b8864a3951071701da8888e583deec7d05d4c0bd145f4d7b03bd71434c2111116eccd9a001466021433720 py3-testing-postgresql-1.3.0.tar.gz +42a51e77c20daa98f981b58ae9c8efd422dda2d04e53497df61a4e500a2aff4fc6c58c5f298c796b5f8f180ec7625561373991eee0433b11a88c874775469d5a 44_replace-assert-regeexp-matches.patch +" From b020e56156a741bbc9ce48d92b4478c35f6220e0 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Sep 2024 13:01:24 -0400 Subject: [PATCH 5/9] scramp --- ilot/py3-scramp/APKBUILD | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ilot/py3-scramp/APKBUILD b/ilot/py3-scramp/APKBUILD index 916b7a1..f4fdc07 100644 --- a/ilot/py3-scramp/APKBUILD +++ b/ilot/py3-scramp/APKBUILD @@ -12,7 +12,10 @@ license="MIT" depends="py3-asn1crypto" checkdepends="py3-pytest py3-passlib py3-pytest-mock" makedepends="py3-setuptools py3-gpep517 py3-wheel py3-hatchling" -source="$pkgname-$pkgver.tar.gz::https://github.com/tlocke/scramp/archive/refs/tags/$pkgver.tar.gz" +source=" + $pkgname-$pkgver.tar.gz::https://github.com/tlocke/scramp/archive/refs/tags/$pkgver.tar.gz + use-local-version-src.patch +" builddir="$srcdir/$_pkgreal-$pkgver" subpackages="$pkgname-pyc" @@ -36,4 +39,5 @@ package() { sha512sums=" 070bf5b92f45bd506cb0f6aeb4ff7fccfff9092b69bed20338a2cfdf84f5587b9162fa1ffb84db8c98ea5f3e008f34db5848690d857110e1d037bb15d2a95d58 py3-scramp-1.4.5.tar.gz +6ae94c1077040e3d219c62a82a81f13ccec97fcf089fb4b6e7551a2251da3bd14059ea1e344cb54207a41c0c9de59a2b9f57b1a5d1d8f98d1060d4197c1192c8 use-local-version-src.patch " From 591966c55ce9abad5a8020ecbc2e93786ceb2324 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Sep 2024 13:02:09 -0400 Subject: [PATCH 6/9] pg8000 --- ilot/py3-pg8000/APKBUILD | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ilot/py3-pg8000/APKBUILD b/ilot/py3-pg8000/APKBUILD index 92b0b75..3b90f03 100644 --- a/ilot/py3-pg8000/APKBUILD +++ b/ilot/py3-pg8000/APKBUILD @@ -12,7 +12,10 @@ license="BSD-3-Clause" depends="py3-scramp py3-dateutil" checkdepends="py3-pytest" makedepends="py3-setuptools py3-gpep517 py3-wheel py3-hatchling" -source="$pkgname-$pkgver.tar.gz::https://github.com/tlocke/pg8000/archive/refs/tags/$pkgver.tar.gz" +source=" + $pkgname-$pkgver.tar.gz::https://github.com/tlocke/pg8000/archive/refs/tags/$pkgver.tar.gz + use-local-version-file.patch +" options="!check" # TODO required postgresql db builddir="$srcdir/$_pkgreal-$pkgver" subpackages="$pkgname-pyc" @@ -37,4 +40,5 @@ package() { sha512sums=" f04d4aaf3dcaf244e223a093b42473a723de718eeeee648d07f6e3d061f9783c4dff23ff120a1399ab8dd951dee2cf836dd4c7185668cc516f390b293ee72adb py3-pg8000-1.31.2.tar.gz +27bf7ed1a494576674d4a2a889748786910690235b8b368d91e0d46fb7e726dc23a059d8df34246fc7a607c1a85e0d44cbbcf56997a48298874a14e1af8b1b22 use-local-version-file.patch " From c03f44ad4097bf96b667d0841f8878fe245bdf28 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Sep 2024 13:30:33 -0400 Subject: [PATCH 7/9] testing-postgresql --- ilot/py3-testing-postgresql/APKBUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/ilot/py3-testing-postgresql/APKBUILD b/ilot/py3-testing-postgresql/APKBUILD index 05a0f0f..285c99c 100644 --- a/ilot/py3-testing-postgresql/APKBUILD +++ b/ilot/py3-testing-postgresql/APKBUILD @@ -11,6 +11,7 @@ arch="noarch" license="Apache-2.0" depends="py3-testing-common-database py3-pg8000 postgresql" checkdepends="py3-pytest py3-psycopg2 py3-sqlalchemy" +check="!options" # Failure with pid makedepends="py3-setuptools py3-gpep517 py3-wheel" source=" $pkgname-$pkgver.tar.gz::https://github.com/tk0miya/testing.postgresql/archive/refs/tags/$pkgver.tar.gz From 5cfd51e8ef35d225eb478ae08f7d3642064b344d Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Sep 2024 19:18:42 -0400 Subject: [PATCH 8/9] ilot/authentik: enable check --- ilot/authentik/APKBUILD | 62 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 4 deletions(-) diff --git a/ilot/authentik/APKBUILD b/ilot/authentik/APKBUILD index 074ec7f..436ec63 100644 --- a/ilot/authentik/APKBUILD +++ b/ilot/authentik/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Antoine Martin (ayakael) pkgname=authentik pkgver=2024.8.2 -pkgrel=0 +pkgrel=1 pkgdesc="An open-source Identity Provider focused on flexibility and versatility" url="https://github.com/goauthentik/authentik" # s390x: missing py3-celery py3-flower and py3-kombu @@ -153,14 +153,23 @@ depends=" py3-yarl py3-zope-interface py3-zxcvbn - redis + valkey uvicorn " makedepends="go npm" # checkdepends scooped up by poetry due to number -checkdepends="poetry py3-coverage" +checkdepends=" + poetry + py3-coverage + py3-pytest + py3-pytest-django + py3-pytest-randomly + py3-pytest-timeout + py3-freezegun + py3-boto3 + py3-requests-mock + " # tests disabled for now -options="!check" install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-install" source=" $pkgname-$pkgver.tar.gz::https://github.com/goauthentik/authentik/archive/refs/tags/version/$pkgver.tar.gz @@ -204,6 +213,51 @@ build() { npm run build } +check() { + msg "Starting postgresql" + export POSTGRES_DB=authentik + export POSTGRES_USER=authentik + export POSTGRES_PASSWORD="EK-5jnKfjrGRm<77" + export AUTHENTIK_POSTGRESQL__TEST__NAME=authentik + + rm -Rf "$srcdir"/tmp + valkey-server > "$srcdir"/tmp/valkey.log 2>&1 & + initdb -D "$srcdir"/tmp + postgres -D "$srcdir"/tmp --unix-socket-directories="$srcdir" > "$srcdir"/tmp/psql.log 2>&1 & + trap "pkill valkey-server; pkill postgresql" EXIT + sleep 3 + psql -h "$srcdir" -d postgres -c "CREATE ROLE $POSTGRES_USER PASSWORD '$POSTGRES_PASSWORD' INHERIT LOGIN;" + psql -h "$srcdir" -d postgres -c "CREATE DATABASE $POSTGRES_DB OWNER $POSTGRES_USER ENCODING 'UTF-8';" + psql -h "$srcdir" -d postgres -c "CREATE DATABASE test_$POSTGRES_DB OWNER $POSTGRES_USER ENCODING 'UTF-8';" + + # .github/actions/setup/action.yml: Generate config + csrf + python3 -c " +from authentik.lib.generators import generate_id +from yaml import safe_dump + +with open(\"local.env.yml\", \"w\") as _config: + safe_dump( + { + \"log_level\": \"debug\", + \"secret_key\": generate_id(), + \"csrf\": { \"trusted_origins\": ['https://*']}, + }, + _config, + default_flow_style=False, + ) +" + python -m lifecycle.migrate + + # no selenium package + pip install selenium drf_jsonschema_serializer pdoc --break-system-packages + + make test || FAIL=true + + if [ "$FAIL" = "true" ]; then + return 1 + fi +} + package() { msg "Packaging $pkgname" mkdir -p "$pkgdir"/usr/share/webapps/authentik/web From 7ad408f2a3f0b9625563f7e279b5d54ea4a319c6 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Sep 2024 19:19:05 -0400 Subject: [PATCH 9/9] backports/py3-sentry-sdk: new aport --- backports/py3-sentry-sdk/APKBUILD | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 backports/py3-sentry-sdk/APKBUILD diff --git a/backports/py3-sentry-sdk/APKBUILD b/backports/py3-sentry-sdk/APKBUILD new file mode 100644 index 0000000..3162a03 --- /dev/null +++ b/backports/py3-sentry-sdk/APKBUILD @@ -0,0 +1,60 @@ +# Contributor: Francesco Colista +# Maintainer: Francesco Colista +pkgname=py3-sentry-sdk +pkgver=2.14.0 +pkgrel=0 +pkgdesc="The new Python SDK for Sentry.io" +url="https://sentry.io/for/python/" +arch="noarch" +license="BSD-2-Clause" +depends=" + py3-certifi + py3-urllib3 + " +makedepends=" + py3-gpep517 + py3-setuptools + py3-wheel + " +checkdepends=" + py3-executing + py3-jsonschema + py3-pytest-asyncio + py3-pytest-forked + py3-pytest-localserver + py3-pytest-xdist + py3-responses + py3-werkzeug + " +subpackages="$pkgname-pyc" +source="$pkgname-$pkgver.tar.gz::https://github.com/getsentry/sentry-python/archive/$pkgver.tar.gz" +builddir="$srcdir"/sentry-python-$pkgver +options="!check" # a bunch of deprecation-warning failures and improper shutdown.. seems to need net + +build() { + 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 + # gcp: pip install + # test_socket/test_requests: needs net + # wsgi: weird list errors + .testenv/bin/python3 -m pytest -n auto -p no:warnings \ + --deselect tests/integrations/gcp/test_gcp.py \ + --deselect tests/integrations/socket/test_socket.py \ + --deselect tests/integrations/requests/test_requests.py \ + --deselect tests/integrations/wsgi/test_wsgi.py +} + +package() { + python3 -m installer -d "$pkgdir" \ + .dist/*.whl +} + +sha512sums=" +8667c3496cdbd6b3055f8046abcf3faa8afbda04e0551787222d44c7736deea95722251c266c21730a73afd57d4b7447ec17408672c3217af35103bba6f4b513 py3-sentry-sdk-2.14.0.tar.gz +"