summaryrefslogtreecommitdiff
path: root/dev-python/fastapi
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/fastapi')
-rw-r--r--dev-python/fastapi/Manifest1
-rw-r--r--dev-python/fastapi/fastapi-0.136.3.ebuild91
-rw-r--r--dev-python/fastapi/metadata.xml9
3 files changed, 101 insertions, 0 deletions
diff --git a/dev-python/fastapi/Manifest b/dev-python/fastapi/Manifest
new file mode 100644
index 000000000000..d9322adec108
--- /dev/null
+++ b/dev-python/fastapi/Manifest
@@ -0,0 +1 @@
+DIST fastapi-0.136.3.tar.gz 396410 BLAKE2B eb55e632fea8e59a5f133b0b4c18dd158a8427bbcb8ecfd1656e019fb3c117598b18286afab6e1c27492ca3d8e0b5eb286d027428707890097ca5ea5d4e7a354 SHA512 a97358391f0c86f370949296c3c79e31086fc8faa8b721d216ac47fdce0b6052ab7fce0b4448e89c3faeb8b500dface43b86a4084c599e7d19fcc6dfca7a54d3
diff --git a/dev-python/fastapi/fastapi-0.136.3.ebuild b/dev-python/fastapi/fastapi-0.136.3.ebuild
new file mode 100644
index 000000000000..30bfda36d0bd
--- /dev/null
+++ b/dev-python/fastapi/fastapi-0.136.3.ebuild
@@ -0,0 +1,91 @@
+# Copyright 2025-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=pdm-backend
+PYTHON_COMPAT=( python3_{13..14} )
+#may be not stricly required
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 optfeature pypi
+
+DESCRIPTION="High performance framework, easy to learn, fast to code, ready for production"
+HOMEPAGE="https://fastapi.tiangolo.com/ https://pypi.org/project/fastapi/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ >=dev-python/annotated-doc-0.0.4[${PYTHON_USEDEP}]
+ >=dev-python/starlette-0.46.0[${PYTHON_USEDEP}]
+ >=dev-python/pydantic-2.9.0[${PYTHON_USEDEP}]
+ >=dev-python/typing-extensions-4.8.0[${PYTHON_USEDEP}]
+ >=dev-python/typing-inspection-0.4.2[${PYTHON_USEDEP}]
+"
+
+#FIXME: add missing deps
+BDEPEND="test? (
+ dev-python/a2wsgi[${PYTHON_USEDEP}]
+ dev-python/dirty-equals[${PYTHON_USEDEP}]
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/inline-snapshot[${PYTHON_USEDEP}]
+ dev-python/pytest-timeout[${PYTHON_USEDEP}]
+ dev-python/python-multipart[${PYTHON_USEDEP}]
+ dev-python/sqlalchemy[${PYTHON_USEDEP}]
+ dev-python/typer[${PYTHON_USEDEP}]
+)"
+
+# 3k tests+, so use xdist to speed them up
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+# There are some JSON response tests that will exercise orjson or ujson if they are available.
+# These are properly skipped if the optional dependencies are not installed at the cost of a little spam.
+python_test() {
+ local EPYTEST_IGNORE=(
+ # python/strawberry-graphql (in guru, test dep only)
+ tests/test_tutorial/test_graphql/test_tutorial001.py
+ # dev-python/sqlmodel (in guru, test dep only)
+ tests/test_tutorial/test_sql_databases/test_tutorial001.py
+ tests/test_tutorial/test_sql_databases/test_tutorial002.py
+ # dev-python/fastapi-cli (missing, test and optfeature)
+ tests/test_fastapi_cli.py
+ # dev-python/pwdlib (in guru, test dep only)
+ tests/test_tutorial/test_security/test_tutorial004.py
+ tests/test_tutorial/test_security/test_tutorial005.py
+ # Wants dev-python/multipart _just_ to complain that it's not the right multipart lib.
+ tests/test_multipart_installation.py
+ # scripts/tests use CliRunner.isolated_filesystem() removed in recent typer
+ scripts/tests
+ )
+ local EPYTEST_DESELECT=(
+ # Requires investigation - missing ./image.png test file (?)
+ tests/test_tutorial/test_additional_responses/test_tutorial004.py::test_path_operation_img
+ )
+ epytest
+}
+
+pkg_postinst() {
+ # not part of any upstream extra
+ optfeature "alternative JSON library" "dev-python/ujson" # orjson, too but it's deprecated
+
+ # pyproject.toml:project.optional-dependencies.standard
+ # Following optfeatures should be exposed, but missing deps
+ # optfeature "fastAPI CLI" "dev-python/fastapi-cli" - missing - depends on this package!
+ # optfeature "compressed file support" "dev-python/fastar" - missing
+ # optfeature "pydantic extra types support" "dev-python/pydantic-extra-types" - in guru
+ optfeature_header "standard extras"
+ optfeature "ASGI server support" "dev-python/uvicorn"
+ optfeature "email validation support" "dev-python/email-validator"
+ optfeature "TestClient for testing FastAPI applications" "dev-python/httpx"
+ optfeature "templating support" "dev-python/jinja2"
+ optfeature "multipart form data support" "dev-python/python-multipart"
+ optfeature "settings management support" "dev-python/pydantic-settings"
+
+ # pyproject.toml:project.optional-dependencies.all - includes all the above plus:
+ optfeature_header "all extras"
+ optfeature "session middleware support" "dev-python/itsdangerous"
+ optfeature "YAML support" "dev-python/pyyaml"
+}
diff --git a/dev-python/fastapi/metadata.xml b/dev-python/fastapi/metadata.xml
new file mode 100644
index 000000000000..7b4b286e100f
--- /dev/null
+++ b/dev-python/fastapi/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>kangie@gentoo.org</email>
+ <name>Matt Jolly</name>
+ </maintainer>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>