depot/third_party/nixpkgs/pkgs/development/python-modules/python-utils/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

59 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
loguru,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
typing-extensions,
}:
buildPythonPackage rec {
pname = "python-utils";
version = "3.8.2";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "WoLpH";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-2scWyj0Fz39Thu0T0+UirT+he6tPYKGsvmYzzpD+/ls=";
};
postPatch = ''
sed -i pytest.ini \
-e '/--cov/d' \
-e '/--mypy/d'
'';
propagatedBuildInputs = [ typing-extensions ];
passthru.optional-dependencies = {
loguru = [ loguru ];
};
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
] ++ passthru.optional-dependencies.loguru;
pythonImportsCheck = [ "python_utils" ];
pytestFlagsArray = [ "_python_utils_tests" ];
disabledTests = [
# Flaky tests
"test_timeout_generator"
];
meta = with lib; {
description = "Module with some convenient utilities";
homepage = "https://github.com/WoLpH/python-utils";
changelog = "https://github.com/wolph/python-utils/releases/tag/v${version}";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
}