2021-04-15 02:42:30 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-07-05 17:37:22 -05:00
|
|
|
, loguru
|
2022-10-30 19:28:11 +01:00
|
|
|
, pytest-asyncio
|
2022-01-17 10:59:12 -08:00
|
|
|
, pytest-mypy
|
2022-10-30 19:28:11 +01:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-04-15 02:42:30 +02:00
|
|
|
}:
|
2017-10-21 04:12:01 +03:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-11-09 19:26:09 +08:00
|
|
|
pname = "python-utils";
|
2022-10-30 11:59:07 +00:00
|
|
|
version = "3.4.5";
|
2022-10-30 19:28:11 +01:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2017-10-21 04:12:01 +03:00
|
|
|
|
2021-04-15 02:42:30 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "WoLpH";
|
|
|
|
repo = pname;
|
2022-10-30 11:59:07 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-O/+jvdzzxUFaQdAfUM9p40fPPDNN+stTauCD993HH6Y=";
|
2017-10-21 04:12:01 +03:00
|
|
|
};
|
|
|
|
|
2018-01-13 03:47:40 +08:00
|
|
|
postPatch = ''
|
2021-04-15 02:42:30 +02:00
|
|
|
sed -i '/--cov/d' pytest.ini
|
2022-11-26 14:56:15 +01:00
|
|
|
sed -i '/--mypy/d' pytest.ini
|
2018-01-13 03:47:40 +08:00
|
|
|
'';
|
|
|
|
|
2022-10-30 19:28:11 +01:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
loguru = [
|
|
|
|
loguru
|
|
|
|
];
|
|
|
|
};
|
2017-10-21 04:12:01 +03:00
|
|
|
|
2021-04-15 02:42:30 +02:00
|
|
|
checkInputs = [
|
2022-10-30 19:28:11 +01:00
|
|
|
pytest-asyncio
|
2022-01-17 10:59:12 -08:00
|
|
|
pytest-mypy
|
2021-04-15 02:42:30 +02:00
|
|
|
pytestCheckHook
|
2022-10-30 19:28:11 +01:00
|
|
|
] ++ passthru.optional-dependencies.loguru;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"python_utils"
|
2021-04-15 02:42:30 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"_python_utils_tests"
|
|
|
|
];
|
2017-10-21 04:12:01 +03:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module with some convenient utilities";
|
|
|
|
homepage = "https://github.com/WoLpH/python-utils";
|
2022-11-26 14:56:15 +01:00
|
|
|
changelog = "https://github.com/wolph/python-utils/releases/tag/v${version}";
|
2017-10-21 04:12:01 +03:00
|
|
|
license = licenses.bsd3;
|
2022-10-30 19:28:11 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-10-21 04:12:01 +03:00
|
|
|
};
|
|
|
|
}
|