1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/py3-fastapi/APKBUILD
2023-10-30 20:42:58 +00:00

66 lines
1.8 KiB
Text

# Contributor: Steven Guikal <void@fluix.one>
# Maintainer: Steven Guikal <void@fluix.one>
pkgname=py3-fastapi
pkgver=0.104.1
pkgrel=0
pkgdesc="Modern, high-performance, web framework for building APIs based on standard Python type hints"
url="https://github.com/tiangolo/fastapi"
arch="noarch !armhf !ppc64le" # limited by py3-starlette
license="MIT"
depends="
py3-pydantic
py3-starlette
"
makedepends="
py3-gpep517
py3-hatchling
py3-installer
"
checkdepends="
py3-dirty-equals
py3-email-validator
py3-flask
py3-httpx
py3-orjson
py3-passlib
py3-peewee
py3-pytest
py3-pytest-xdist
py3-python-jose
py3-python-multipart
py3-sqlalchemy
py3-trio
py3-ujson
py3-yaml
"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/tiangolo/fastapi/archive/refs/tags/$pkgver.tar.gz
pytest-markers.patch
"
builddir="$srcdir/fastapi-$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
# Depends on older SQLAlchemy and slated for removal:
# https://github.com/tiangolo/fastapi/blob/dd4e78ca7b09abdf0d4646fe4697316c021a8b2e/requirements-tests.txt#L9
.testenv/bin/python3 -m pytest -p no:warnings \
--ignore-glob "tests/test_tutorial/*sql_databases" \
--ignore tests/test_dependency_normal_exceptions.py
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
bed93b84709c64e4f6d170faeade91643a9186962ff5d34bb659fb303ea439c4f52f5e9f1e15f4ca0dd56a5e753ccdaa9bf5372deeb7dbd26ae84f59c393e58a py3-fastapi-0.104.1.tar.gz
854946e3e52460edfd84cd44e254659354171e88245f4134c7f943a07bf3b08455ad81c54f4c58c50f639aa7288e25d81711f3d7867bbe2d6c83844e2fdd9921 pytest-markers.patch
"