mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-08 04:04:51 +02:00
Resolves build failure due to failed tests with sqlalchemy >= 2.0.36. Example error: ``` ___________________________ test_explicit_table[db2] ___________________________ [...] self = <sqlalchemy.orm.decl_base._ClassScanMapperConfig object at 0xf4a06828> [...] # can't create a dataclass if __table__ is already there. This would # fail an assertion when calling _get_arguments_for_make_dataclass: # assert False, "Mapped[] received without a mapping declaration" if "__table__" in self.cls.__dict__: > raise exc.InvalidRequestError( f"Class {self.cls} already defines a '__table__'. " "ORM Annotated Dataclasses do not support a pre-existing " "'__table__' element" ) E sqlalchemy.exc.InvalidRequestError: Class <class 'test_model_bind.test_explicit_table.<locals>.User'> already defines a '__table__'. ORM Annotated Dataclasses do not support a pre-existing '__table__' element /usr/lib/python3.12/site-packages/sqlalchemy/orm/decl_base.py:1074: InvalidRequestError ```
42 lines
1.5 KiB
Text
42 lines
1.5 KiB
Text
# Contributor: Simon Rupf <simon@rupf.net>
|
|
# Contributor: Philipp Glaum <p@pglaum.de>
|
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=py3-flask-sqlalchemy
|
|
_pkgname=flask_sqlalchemy
|
|
pkgver=3.1.1
|
|
pkgrel=1
|
|
pkgdesc="Adds SQLAlchemy support to your Flask application."
|
|
url="https://pypi.org/project/Flask-SQLAlchemy/"
|
|
arch="noarch"
|
|
license="BSD-3-Clause"
|
|
depends="py3-flask py3-greenlet py3-sqlalchemy"
|
|
makedepends="py3-gpep517 py3-flit-core"
|
|
checkdepends="py3-pytest py3-mock"
|
|
subpackages="$pkgname-pyc"
|
|
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
|
|
python-3.12.patch
|
|
tests-skip-table-binding.patch"
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
|
|
build() {
|
|
gpep517 build-wheel \
|
|
--wheel-dir .dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
python3 -m venv --clear --without-pip --system-site-packages .testenv
|
|
.testenv/bin/python3 -m installer .dist/*.whl
|
|
.testenv/bin/python3 -m pytest
|
|
}
|
|
|
|
package() {
|
|
python3 -m installer -d "$pkgdir" \
|
|
.dist/*.whl
|
|
}
|
|
|
|
sha512sums="
|
|
27a93efb96bc8afe483dc32f9e9756e5972029464f4a201e8a55bf62b88f6bcd93ed7f4472ac21cb17376c87852a1d4b5f98a8ddb55d9b12c334346d5bc7e464 flask_sqlalchemy-3.1.1.tar.gz
|
|
73ec31ca3c78081b6c73fcf28dc2c5fe063104a3352b2f51bfe8a70106c85c1df8b90b7a1529cd7bc55e1a5fcb0ee1e043524afe7a1b7d4c97b130def3803a27 python-3.12.patch
|
|
63f322f77052312fe2abd268a9fc50075f6696e109aa7e4e018e3fd2f8fcccd1d1669eb59a38a94822824196d5124577d5b2a1174fd924e33f10dd79fa23b6ac tests-skip-table-binding.patch
|
|
"
|