blob: 38a691953cbbc8c4f1e4ac51a96b517b34088ffc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
SUMMARY = "FastAPI framework"
DESCRIPTION = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
HOMEPAGE = "https://fastapi.tiangolo.com/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=95792ff3fe8e11aa49ceb247e66e4810"
SRC_URI[sha256sum] = "e8822fc40db1e1858054d7a949a888695bc9bdce70139178e33bd2871a453ca1"
SRC_URI += "file://run-ptest"
CVE_PRODUCT = "tiangolo:fastapi"
inherit pypi python_pdm ptest-python-pytest
PACKAGECONFIG ?= ""
# swagger-ui is in meta-webserver that meta-python does not depend upon
# Users can still enable it in their distros explicitly but its disabled
# by default
PACKAGECONFIG[swagger-ui] = ",,,swagger-ui"
RDEPENDS:${PN} += "\
python3-annotated-doc \
python3-fastapi-cli \
python3-json \
python3-pydantic \
python3-starlette \
python3-typing-extensions \
"
RDEPENDS:${PN}-ptest += "\
python3-coverage \
python3-httpx \
python3-orjson \
python3-dirty-equals \
python3-pytest-httpx \
python3-python-multipart \
python3-sqlalchemy \
python3-trio \
"
do_install_ptest:append() {
install -d ${D}${PTEST_PATH}/scripts
cp -rf ${S}/scripts/* ${D}${PTEST_PATH}/scripts/
rm -rf ${D}${PTEST_PATH}/scripts/tests
cp -rf ${S}/docs_src ${D}${PTEST_PATH}/
echo "import sys; from pathlib import Path; sys.path.insert(0, str(Path(__file__).parent))" > ${D}${PTEST_PATH}/conftest.py
# these docs examples need python3-pydantic-settings, which meta-python
# doesn't package
rm -rf ${D}${PTEST_PATH}/docs_src/settings/app02_an_py310
rm -rf ${D}${PTEST_PATH}/docs_src/settings/app02_py310
}
|