2022-06-04 16:27:26 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, typing
|
2022-09-13 15:14:06 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonAtLeast
|
2022-06-04 16:27:26 +00:00
|
|
|
, pythonOlder
|
|
|
|
}:
|
2018-09-17 15:30:25 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2019-10-24 07:56:26 +00:00
|
|
|
pname = "mypy-extensions";
|
2019-10-24 06:47:39 +00:00
|
|
|
version = "0.4.3";
|
2018-09-17 15:30:25 +00:00
|
|
|
|
2022-06-04 16:27:26 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python";
|
|
|
|
repo = "mypy_extensions";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-JjhbxX5DBAbcs1o2fSWywz9tot792q491POXiId+NyI=";
|
2018-09-17 15:30:25 +00:00
|
|
|
};
|
|
|
|
|
2021-11-14 23:35:59 +00:00
|
|
|
propagatedBuildInputs = lib.optional (pythonOlder "3.5") typing;
|
2018-09-17 15:30:25 +00:00
|
|
|
|
2022-09-13 15:14:06 +00:00
|
|
|
# make the testsuite run with pytest, so we can disable individual tests
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-08-06 16:32:04 +00:00
|
|
|
|
2022-09-13 15:14:06 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/testextensions.py"
|
|
|
|
];
|
2022-06-04 16:27:26 +00:00
|
|
|
|
2022-09-13 15:14:06 +00:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
# https://github.com/python/mypy_extensions/issues/24
|
|
|
|
"test_typeddict_errors"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mypy_extensions"
|
|
|
|
];
|
2022-06-04 16:27:26 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-09-17 15:30:25 +00:00
|
|
|
description = "Experimental type system extensions for programs checked with the mypy typechecker";
|
2021-11-14 23:35:59 +00:00
|
|
|
homepage = "http://www.mypy-lang.org";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ martingms lnl7 SuperSandro2000 ];
|
2018-09-17 15:30:25 +00:00
|
|
|
};
|
|
|
|
}
|