2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, typing
|
2022-09-14 18:05:37 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonAtLeast
|
2022-06-16 17:23:12 +00:00
|
|
|
, pythonOlder
|
|
|
|
}:
|
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
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-14 18:05:37 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2022-09-14 18:05:37 +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"
|
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ martingms lnl7 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|