2021-04-26 19:14:03 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-07-14 12:49:19 +00:00
|
|
|
, loguru
|
2022-11-02 22:02:43 +00:00
|
|
|
, pytest-asyncio
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytest-mypy
|
2022-11-02 22:02:43 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-04-26 19:14:03 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-utils";
|
2022-11-02 22:02:43 +00:00
|
|
|
version = "3.4.5";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "WoLpH";
|
|
|
|
repo = pname;
|
2022-11-02 22:02:43 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-O/+jvdzzxUFaQdAfUM9p40fPPDNN+stTauCD993HH6Y=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-04-26 19:14:03 +00:00
|
|
|
sed -i '/--cov/d' pytest.ini
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
loguru = [
|
|
|
|
loguru
|
|
|
|
];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
checkInputs = [
|
2022-11-02 22:02:43 +00:00
|
|
|
pytest-asyncio
|
2022-02-10 20:34:41 +00:00
|
|
|
pytest-mypy
|
2021-04-26 19:14:03 +00:00
|
|
|
pytestCheckHook
|
2022-11-02 22:02:43 +00:00
|
|
|
] ++ passthru.optional-dependencies.loguru;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"python_utils"
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"_python_utils_tests"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module with some convenient utilities";
|
|
|
|
homepage = "https://github.com/WoLpH/python-utils";
|
|
|
|
license = licenses.bsd3;
|
2022-11-02 22:02:43 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|