47 lines
1.8 KiB
Bash
47 lines
1.8 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
|
|
_name="${pkgname#python-}"
|
|
pkgver=2.0.36
|
|
_ver="rel_${pkgver//./_}"
|
|
pkgrel=2
|
|
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
|
|
url="https://www.sqlalchemy.org/"
|
|
license=('MIT')
|
|
pkgdesc='Python SQL toolkit and Object Relational Mapper'
|
|
depends=('glibc' 'python' 'python-greenlet' 'python-typing_extensions') # HACK: typing_extensions is not required but upstream unconditionally imports it
|
|
optdepends=('python-psycopg2: connect to PostgreSQL database')
|
|
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel' 'cython')
|
|
checkdepends=('python-pytest' 'python-pytest-xdist' 'mypy')
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/sqlalchemy/sqlalchemy/archive/refs/tags/${_ver}.tar.gz")
|
|
# https://github.com/sqlalchemy/sqlalchemy/discussions/11138
|
|
#validpgpkeys=('83AF7ACE251C13E6BB7DEFBD330239C1C4DAFEE1')
|
|
sha512sums=('ba8e3b199928fa0b28447132630337b5d1e0c7dfc890f2968e47250a4b10e9b70f043c139faef75b99de5d19c452920260914fb039328d73c44939227474c239')
|
|
|
|
prepare() {
|
|
cd $_name-$_ver
|
|
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")' \
|
|
lib/sqlalchemy/testing/warnings.py
|
|
}
|
|
|
|
build() {
|
|
cd $_name-$_ver
|
|
python -m build --wheel --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd $_name-$_ver
|
|
PYTHONPATH=build/lib pytest
|
|
}
|
|
|
|
package() {
|
|
cd $_name-$_ver
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
install -D -m644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 ft=sh et:
|