| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 2.13.1 | 8 | ~amd64 | 0 |
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( python3_{12..13} )
PYPI_VERIFY_REPO=https://github.com/pydantic/pydantic-settings
inherit distutils-r1 optfeature pypi
DESCRIPTION="Settings management using pydantic"
HOMEPAGE="
https://github.com/pydantic/pydantic-settings/
https://pypi.org/project/pydantic-settings/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
>=dev-python/pydantic-2.7.0[${PYTHON_USEDEP}]
>=dev-python/python-dotenv-0.21.0[${PYTHON_USEDEP}]
>=dev-python/typing-inspection-0.4.0[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
>=dev-util/diff-cover-9.2.0[${PYTHON_USEDEP}]
dev-python/boto3[${PYTHON_USEDEP}]
dev-python/moto[${PYTHON_USEDEP}]
dev-python/pytest-examples[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=( pytest-examples pytest-mock )
distutils_enable_tests pytest
EPYTEST_DESELECT=(
# TODO: requires azure package
"tests/test_docs.py::test_docs_examples"
# TODO: AssertionError: assert 'pydantic_settings-2.4.0.tar.gz' == 'default'
"tests/test_settings.py::test_ignore_empty_with_dotenv_when_empty_uses_default"
"tests/test_settings.py::test_ignore_empty_with_dotenv_when_not_empty_uses_value"
# Related?
"tests/test_precedence_and_merging.py::test_merging_preserves_earlier_values"
# TODO: Failed: DID NOT RAISE <class 'UserWarning'>
"tests/test_settings.py::test_protected_namespace_defaults"
)
EPYTEST_IGNORE=(
# TODO: requires azure package
"tests/test_source_azure_key_vault.py"
)
python_test() {
# parsing --help output is width dependent
local -x COLUMNS=80
epytest
}
pkg_postinst() {
optfeature "aws secret manager" dev-python/boto3
}
>=dev-python/pydantic-2.7.0[${PYTHON_USEDEP}]
>=dev-python/python-dotenv-0.21.0[${PYTHON_USEDEP}]
>=dev-python/typing-inspection-0.4.0[${PYTHON_USEDEP}]
test? (
>=dev-util/diff-cover-9.2.0[${PYTHON_USEDEP}]
dev-python/boto3[${PYTHON_USEDEP}]
dev-python/moto[${PYTHON_USEDEP}]
dev-python/pytest-examples[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
)