2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
fastapi,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flask,
|
|
|
|
httpx,
|
|
|
|
mypy-boto3-s3,
|
|
|
|
numpy,
|
|
|
|
pydantic,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
|
|
|
scipy,
|
|
|
|
six,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dependency-injector";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "4.41.0";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ets-labs";
|
|
|
|
repo = "python-dependency-injector";
|
|
|
|
rev = version;
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-U3U/L8UuYrfpm4KwVNmViTbam7QdZd2vp1p+ENtOJlw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ six ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
aiohttp = [ aiohttp ];
|
|
|
|
pydantic = [ pydantic ];
|
|
|
|
flask = [ flask ];
|
|
|
|
yaml = [ pyyaml ];
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs =
|
|
|
|
[
|
|
|
|
fastapi
|
|
|
|
httpx
|
|
|
|
mypy-boto3-s3
|
|
|
|
numpy
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
scipy
|
|
|
|
]
|
|
|
|
++ passthru.optional-dependencies.aiohttp
|
|
|
|
++ passthru.optional-dependencies.pydantic
|
|
|
|
++ passthru.optional-dependencies.yaml
|
|
|
|
++ passthru.optional-dependencies.flask;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "dependency_injector" ];
|
2021-07-14 22:03:04 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTestPaths = [
|
2022-12-17 10:02:37 +00:00
|
|
|
# Exclude tests for EOL Python releases
|
2021-05-20 23:08:51 +00:00
|
|
|
"tests/unit/ext/test_aiohttp_py35.py"
|
2022-12-17 10:02:37 +00:00
|
|
|
"tests/unit/wiring/test_*_py36.py"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Dependency injection microframework for Python";
|
|
|
|
homepage = "https://github.com/ets-labs/python-dependency-injector";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/ets-labs/python-dependency-injector/blob/${version}/docs/main/changelog.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ gerschtli ];
|
2024-01-13 08:15:51 +00:00
|
|
|
# https://github.com/ets-labs/python-dependency-injector/issues/726
|
|
|
|
broken = versionAtLeast pydantic.version "2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|