45 lines
1.6 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Sébastien Luttringer <seblu@aur.archlinux.org>
pkgname=python-sqlalchemy
pkgver=1.4.44
pkgrel=1
arch=(x86_64 powerpc64le powerpc riscv64)
url="https://www.sqlalchemy.org/"
license=('MIT')
pkgdesc='Python SQL toolkit and Object Relational Mapper'
depends=('python' 'python-greenlet')
optdepends=('python-psycopg2: connect to PostgreSQL database')
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest-runner' 'python-pytest-xdist')
source=("https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-$pkgver.tar.gz"{,.asc})
validpgpkeys=('83AF7ACE251C13E6BB7DEFBD330239C1C4DAFEE1')
sha512sums=('ba4e022f7af77cdf099b59a7af088852d7d4e0b4c6d632a63d244f501ff0b76837e601de63619f219fe50e6d526cd13415c4e623a6127afb0a2f24b87a4c3ece'
'SKIP')
prepare() {
sed -i '/warnings.filterwarnings("error", category=DeprecationWarning)/a \ warnings.filterwarnings("ignore", category=DeprecationWarning, message="Creating a LegacyVersion has been deprecated and will be removed in the next major release")' \
SQLAlchemy-$pkgver/lib/sqlalchemy/testing/warnings.py
}
build() {
cd "$srcdir"/SQLAlchemy-$pkgver
python -m build --wheel --no-isolation
}
check() {
cd "$srcdir"/SQLAlchemy-$pkgver
PYTHONPATH=build/lib pytest
}
package() {
cd SQLAlchemy-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 ft=sh et: