2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
typing,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mypy-extensions";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python";
|
|
|
|
repo = "mypy_extensions";
|
|
|
|
rev = version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-gOfHC6dUeBE7SsWItpUHHIxW3wzhPM5SuGW1U8P7DD0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = lib.optional (pythonOlder "3.5") typing;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
# make the testsuite run with pytest, so we can disable individual tests
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "tests/testextensions.py" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
# https://github.com/python/mypy_extensions/issues/24
|
|
|
|
"test_typeddict_errors"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "mypy_extensions" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Experimental type system extensions for programs checked with the mypy typechecker";
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://www.mypy-lang.org";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.mit;
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with maintainers; [ lnl7 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|