# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=python-sentry_sdk
_pkgname=sentry-python
pkgver=2.7.0
pkgrel=1
pkgdesc="The official Python SDK for Sentry.io"
arch=('any')
url="https://sentry.io/for/python"
license=('MIT')
depends=('python-urllib3' 'python-certifi')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
optdepends=('python-aiohttp: adds support for the AIOHTTP-Server Web Framework'
            'python-bottle: adds support for the Bottle Web Framework'
            'python-celery: adds support for the Celery Task Queue System'
            'python-django: adds support for the Django Web Framework'
            'python-falcon: adds support for the Falcon Web Framework'
            'python-fastapi: adds support for the FastAPI framework'
            'python-flask: adds support for the Flask Web Framework'
            'python-grpcio: gRPC integration'
            'python-httpx: HTTPX integration'
            'python-loguru: Loguru Integration'
            'python-multipart: Optional dependency of Starlette to parse form data'
            'python-pymongo: PyMongo integration'
            'python-quart: adds support for the Quart Web Framework'
            'python-redis: adds support for the RQ Job Queue System'
            'python-sqlalchemy: captures queries from SQLAlchemy as breadcrumbs'
            'python-starlette: adds support for the Starlette Framework'
            'python-tornado: adds support for the Tornado Web Framework'
            'python-pure-eval: for richer stacktraces & additional variables'
            'python-executing: for richer stacktraces & better function names')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/getsentry/sentry-python/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('f0e622d66e3376a4add6da3bd4d3b6ba7b4cf372e4784b5075fb39d38ab8c7b8')

build() {
	cd "${_pkgname}-${pkgver}"
	python -m build --wheel --no-isolation
}

package() {
	cd "${_pkgname}-${pkgver}"
	python -m installer --destdir="${pkgdir}" dist/*.whl
	install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
