2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, buildPythonPackage
|
|
|
|
, fastapi
|
|
|
|
, fetchFromGitHub
|
|
|
|
, flask
|
|
|
|
, httpx
|
|
|
|
, mypy-boto3-s3
|
|
|
|
, numpy
|
|
|
|
, pydantic
|
2022-12-17 10:02:37 +00:00
|
|
|
, pytest-asyncio
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytestCheckHook
|
2022-12-17 10:02:37 +00:00
|
|
|
, pythonOlder
|
2021-05-20 23:08:51 +00:00
|
|
|
, pyyaml
|
2022-12-17 10:02:37 +00:00
|
|
|
, scipy
|
2021-05-20 23:08:51 +00:00
|
|
|
, six
|
|
|
|
}:
|
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
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
aiohttp = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
pydantic = [
|
|
|
|
pydantic
|
|
|
|
];
|
|
|
|
flask = [
|
|
|
|
flask
|
|
|
|
];
|
|
|
|
yaml = [
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
fastapi
|
|
|
|
httpx
|
|
|
|
mypy-boto3-s3
|
|
|
|
numpy
|
2022-12-17 10:02:37 +00:00
|
|
|
pytest-asyncio
|
2021-05-20 23:08:51 +00:00
|
|
|
pytestCheckHook
|
2022-12-17 10:02:37 +00:00
|
|
|
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
|
|
|
|
2022-12-17 10:02:37 +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 ];
|
|
|
|
};
|
|
|
|
}
|