[meta-python][PATCH 04/12] python3-fastapi: ship docs_src for ptest, drop pydantic-settings-only examples

Khem Raj <[email protected]>
Newsgroups org.openembedded.lists.openembedded-devel
Message-ID <[email protected]>
From: Khem Raj <[email protected]>

Copy docs_src into the ptest tree since scripts/tests import
docs_src.*. Remove the two settings examples that require
python3-pydantic-settings, which meta-openembedded doesn't package.

Signed-off-by: Khem Raj <[email protected]>
---
 .../recipes-devtools/python/python3-fastapi_0.141.1.bb       | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta-python/recipes-devtools/python/python3-fastapi_0.141.1.bb b/meta-python/recipes-devtools/python/python3-fastapi_0.141.1.bb
index d26a0ff070..38a691953c 100644
--- a/meta-python/recipes-devtools/python/python3-fastapi_0.141.1.bb
+++ b/meta-python/recipes-devtools/python/python3-fastapi_0.141.1.bb
@@ -42,5 +42,10 @@ 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
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.