# Maintainer: Luis Martinez # Contributor: Batuhan Baserdem pkgname=python-bugsnag pkgver=4.2.1 pkgrel=1 pkgdesc='Official bugsnag error monitoring and error reporting for various python apps.' arch=('any') url='https://github.com/bugsnag/bugsnag-python' license=('MIT') depends=('python-webob') optdepends=( 'python-flask: Flask integration' 'python-blinker: Flask integration') makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel') changelog=CHANGELOG.md source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('c7a6dcf013a6e942dd48abc86b7296117c52b4309b99ea7ee066281f76489330') build() { cd "bugsnag-python-$pkgver" python -m build --wheel --no-isolation } package() { cd "bugsnag-python-$pkgver" PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" install -d "$pkgdir/usr/share/licenses/$pkgname/" ln -s \ "$_site/bugsnag-$pkgver.dist-info/LICENSE.txt" \ "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }