| 1 | # Contributor: Noel Kuntze <[email protected]> |
| 2 | # Maintainer: Noel Kuntze <[email protected]> |
| 3 | pkgname=py3-sqlmodel |
| 4 | pkgver=0.0.48 |
| 5 | pkgrel=0 |
| 6 | pkgdesc="SQL databases in Python, designed for simplicity, compatibility, and robustness" |
| 7 | url="https://sqlmodel.tiangolo.com" |
| 8 | arch="noarch" |
| 9 | license="MIT" |
| 10 | depends=" |
| 11 | py3-alembic |
| 12 | py3-pydantic |
| 13 | py3-sqlalchemy |
| 14 | py3-typing-extensions |
| 15 | pre-commit |
| 16 | " |
| 17 | makedepends=" |
| 18 | py3-gpep517 |
| 19 | py3-wheel |
| 20 | py3-pdm-backend |
| 21 | " |
| 22 | checkdepends=" |
| 23 | py3-aiosqlite |
| 24 | py3-coverage |
| 25 | py3-dirty-equals |
| 26 | py3-fastapi |
| 27 | py3-httpx |
| 28 | py3-pytest |
| 29 | py3-typer |
| 30 | " |
| 31 | subpackages="$pkgname-pyc" |
| 32 | |
| 33 | source="$pkgname-$pkgver.tar.gz::https://github.com/fastapi/sqlmodel/archive/refs/tags/$pkgver.tar.gz" |
| 34 | |
| 35 | builddir="$srcdir/sqlmodel-$pkgver" |
| 36 | |
| 37 | build() { |
| 38 | gpep517 build-wheel \ |
| 39 | --wheel-dir dist \ |
| 40 | --output-fd 3 3>&1 >&2 |
| 41 | } |
| 42 | |
| 43 | check() { |
| 44 | local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])") |
| 45 | python3 -m installer -d test_dir dist/*.whl |
| 46 | export PYTHONPATH="$PWD/test_dir/$_site_packages:$PYTHONPATH" |
| 47 | |
| 48 | # Remove failing tests relying on old python versions |
| 49 | rm -rf tests/test_select_gen.py \ |
| 50 | tests/test_tutorial/test_create_db_and_table/test_tutorial001*.py |
| 51 | |
| 52 | pytest -vv tests/ |
| 53 | } |
| 54 | |
| 55 | package() { |
| 56 | python -m installer -d "$pkgdir" dist/*.whl |
| 57 | } |
| 58 | |
| 59 | sha512sums=" |
| 60 | 1459eec1a6d6379491cfaea211872a041e5b4c5fe27ebba65ab230b1f55b5891f408025cb11c33faab6804d328b211947eb393907db7fba8723b30cf78fddbab py3-sqlmodel-0.0.48.tar.gz |
| 61 | " |