at 24.05-pre 1.1 kB view raw
1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, typing 5, pytestCheckHook 6, pythonAtLeast 7, pythonOlder 8}: 9 10buildPythonPackage rec { 11 pname = "mypy-extensions"; 12 version = "1.0.0"; 13 14 src = fetchFromGitHub { 15 owner = "python"; 16 repo = "mypy_extensions"; 17 rev = version; 18 hash = "sha256-gOfHC6dUeBE7SsWItpUHHIxW3wzhPM5SuGW1U8P7DD0="; 19 }; 20 21 propagatedBuildInputs = lib.optional (pythonOlder "3.5") typing; 22 23 # make the testsuite run with pytest, so we can disable individual tests 24 nativeCheckInputs = [ 25 pytestCheckHook 26 ]; 27 28 pytestFlagsArray = [ 29 "tests/testextensions.py" 30 ]; 31 32 disabledTests = lib.optionals (pythonAtLeast "3.11") [ 33 # https://github.com/python/mypy_extensions/issues/24 34 "test_typeddict_errors" 35 ]; 36 37 pythonImportsCheck = [ 38 "mypy_extensions" 39 ]; 40 41 meta = with lib; { 42 description = "Experimental type system extensions for programs checked with the mypy typechecker"; 43 homepage = "https://www.mypy-lang.org"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ martingms lnl7 ]; 46 }; 47}