1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 loguru, 7 pytest-asyncio, 8 pytestCheckHook, 9 pythonOlder, 10 typing-extensions, 11}: 12 13buildPythonPackage rec { 14 pname = "python-utils"; 15 version = "3.9.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.9"; 19 20 src = fetchFromGitHub { 21 owner = "WoLpH"; 22 repo = pname; 23 tag = "v${version}"; 24 hash = "sha256-lzLzYI5jShfIwQqvfA8UtPjGawXE80ww7jb/gPzpeDo="; 25 }; 26 27 postPatch = '' 28 sed -i pytest.ini \ 29 -e '/--cov/d' \ 30 -e '/--mypy/d' 31 ''; 32 33 build-system = [ setuptools ]; 34 35 dependencies = [ typing-extensions ]; 36 37 optional-dependencies = { 38 loguru = [ loguru ]; 39 }; 40 41 nativeCheckInputs = [ 42 pytest-asyncio 43 pytestCheckHook 44 ] ++ optional-dependencies.loguru; 45 46 pythonImportsCheck = [ "python_utils" ]; 47 48 pytestFlagsArray = [ "_python_utils_tests" ]; 49 50 disabledTests = [ 51 # Flaky tests 52 "test_timeout_generator" 53 ]; 54 55 meta = with lib; { 56 description = "Module with some convenient utilities"; 57 homepage = "https://github.com/WoLpH/python-utils"; 58 changelog = "https://github.com/wolph/python-utils/releases/tag/v${version}"; 59 license = licenses.bsd3; 60 maintainers = [ ]; 61 }; 62}