nixpkgs/pkgs/development/python-modules/mypy/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchPypi, buildPythonPackage, typed-ast, psutil, isPy3k
, mypy-extensions
, typing-extensions
}:
2018-05-25 11:42:34 +02:00
buildPythonPackage rec {
2017-05-11 22:33:34 +02:00
pname = "mypy";
version = "0.812";
disabled = !isPy3k;
2016-07-11 19:35:00 +02:00
src = fetchPypi {
inherit pname version;
sha256 = "069i9qnfanp7dn8df1vspnqb0flvsszzn22v00vj08nzlnd061yd";
2016-07-11 19:35:00 +02:00
};
propagatedBuildInputs = [ typed-ast psutil mypy-extensions typing-extensions ];
2016-07-12 11:22:24 +02:00
# Tests not included in pip package.
doCheck = false;
pythonImportsCheck = [
"mypy"
"mypy.types"
"mypy.api"
"mypy.fastparse"
"mypy.report"
"mypyc"
"mypyc.analysis"
];
# Compile mypy with mypyc, which makes mypy about 4 times faster. The compiled
# version is also the default in the wheels on Pypi that include binaries.
# is64bit: unfortunately the build would exhaust all possible memory on i686-linux.
MYPY_USE_MYPYC = stdenv.buildPlatform.is64bit;
meta = with lib; {
2016-07-11 19:35:00 +02:00
description = "Optional static typing for Python";
homepage = "http://www.mypy-lang.org";
license = licenses.mit;
2017-05-11 22:33:34 +02:00
maintainers = with maintainers; [ martingms lnl7 ];
2016-07-11 19:35:00 +02:00
};
}