Skip to contentSkip to conversation

package/python-uvicorn: requires PYTHON3_SSL

PATCH Superseded ~bubu 1 participant 2 messages Feb 5, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

~bubu

author
#0 lore raw

PATCH 1/2 package/python-uvicorn: requires PYTHON3_SSL

From: Marcus Hoffmann <[email protected]>

Uvicorn has a hard requirement on the python ssl module. Without it even running uvicorn --help fails.

---
 package/python-uvicorn/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/python-uvicorn/Config.in +1 -0
index 3e769392f9..c84f54781f 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_PYTHON_UVICORN
 	bool "python-uvicorn"
 	select BR2_PACKAGE_PYTHON_CLICK # runtime
 	select BR2_PACKAGE_PYTHON_H11 # runtime
+	select BR2_PACKAGE_PYTHON3_SSL # runtime
 	help
 	  The lightning-fast ASGI server.
 
Signature · 6 lines
2.38.5

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author
#1 lore raw

PATCH 2/2 support/testing: add fastapi runtime test

From: Marcus Hoffmann <[email protected]>

Add a runtime test for fastapi. Use uvicorn as the asgi server application as does the fastapi hello world example [1].

Fastapi depends on PydanticV2 now which is written in rust so we need to run the test on armv7.

[1] https://fastapi.tiangolo.com/tutorial/first-steps/

---
 .../tests/package/sample_python_fastapi.py    |  8 ++++
 .../tests/package/test_python_fastapi.py      | 47 +++++++++++++++++++
 2 files changed, 55 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_fastapi.py
 create mode 100644 support/testing/tests/package/test_python_fastapi.py
support/testing/tests/package/sample_python_fastapi.py new file +8 -0
new file mode 100644
index 0000000000..3116df3a93
@@ -0,0 +1,8 @@
+from fastapi import FastAPI
+
+app = FastAPI()
+
[email protected]("/")
+async def root():
+    return {"message": "Hello World"}
+
support/testing/tests/package/test_python_fastapi.py new file +47 -0

47 lines not on this page · raw message

Signature · 5 lines
2.38.5
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot