aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-sqlalchemy/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-sqlalchemy/APKBUILD')
-rw-r--r--community/py3-sqlalchemy/APKBUILD56
1 files changed, 45 insertions, 11 deletions
diff --git a/community/py3-sqlalchemy/APKBUILD b/community/py3-sqlalchemy/APKBUILD
index d2a00dac2d3..b4e71006ebb 100644
--- a/community/py3-sqlalchemy/APKBUILD
+++ b/community/py3-sqlalchemy/APKBUILD
@@ -1,34 +1,68 @@
-# Contributor: Drew DeVault <sir@cmpwn.com>
-# Maintainer: Drew DeVault <sir@cmpwn.com>
+# Contributor: Steven Guikal <void@fluix.one>
+# Maintainer: Steven Guikal <void@fluix.one>
pkgname=py3-sqlalchemy
-pkgver=1.4.36
+pkgver=2.0.29
pkgrel=0
pkgdesc="object relational mapper for Python"
-url="https://pypi.python.org/pypi/SQLAlchemy"
+url="https://pypi.org/project/SQLAlchemy"
arch="all"
license="MIT"
-makedepends="python3-dev py3-setuptools"
+# py3-typing-extensions: SQLAlchemy 2.0.25 uses TypeAliasType
+# remove this and uncomment prepare() after Python 3.12 upgrade
+depends="
+ py3-greenlet
+ py3-typing-extensions
+ "
+makedepends="
+ cython
+ py3-gpep517
+ py3-setuptools
+ py3-wheel
+ python3-dev
+ "
checkdepends="
- py3-pytest py3-mock py3-pytest-xdist py3-greenlet
-"
+ py3-mock
+ py3-mypy
+ py3-pytest
+ py3-pytest-xdist
+ "
+subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-$pkgver.tar.gz"
builddir="$srcdir/SQLAlchemy-$pkgver"
replaces="py-sqlalchemy" # Backwards compatibility
provides="py-sqlalchemy=$pkgver-r$pkgrel" # Backwards compatibility
+# crashloops until it eventually passes, fixme
+case "$CARCH" in
+x86) options="$options !check" ;;
+esac
+
+prepare() {
+ default_prepare
+ # we have a new enough python for every typing extension
+# grep -l -r 'typing_extensions' . \
+# | grep '.py' \
+# | xargs -n 1 -P ${JOBS:-1} sed -i 's|typing_extensions|typing|g'
+}
+
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- pytest-3 -n ${JOBS:-auto}
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+ .testenv/bin/python3 -m pytest -n auto
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
}
sha512sums="
-c9bb38ce5eeb7817727e93695f10cf5c247710b809f3298b233ed8be4e2cc08e5a14581d0c5aa2af02d7a49f036fe3a0bb7a88120b58bdce0f115016bdaf2c77 SQLAlchemy-1.4.36.tar.gz
+d1143c65fb26335d652083b9a90afaecf78ed312cea5c26f989380204e909c341c1bc3bb1e07274353e1c409d21737fad4d7391f186b2d2373814582d3baaf78 SQLAlchemy-2.0.29.tar.gz
"