Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / mypy / default.nix
blobdbbcb30ffcecc0982e7139ad8b48d483c2e6f0d9
1 { lib, stdenv, fetchPypi, buildPythonPackage, typed-ast, psutil, isPy3k
2 , mypy-extensions
3 , typing-extensions
4 }:
5 buildPythonPackage rec {
6   pname = "mypy";
7   version = "0.812";
8   disabled = !isPy3k;
10   src = fetchPypi {
11     inherit pname version;
12     sha256 = "069i9qnfanp7dn8df1vspnqb0flvsszzn22v00vj08nzlnd061yd";
13   };
15   propagatedBuildInputs = [ typed-ast psutil mypy-extensions typing-extensions ];
17   # Tests not included in pip package.
18   doCheck = false;
20   pythonImportsCheck = [
21     "mypy"
22     "mypy.types"
23     "mypy.api"
24     "mypy.fastparse"
25     "mypy.report"
26     "mypyc"
27     "mypyc.analysis"
28   ];
30   # Compile mypy with mypyc, which makes mypy about 4 times faster. The compiled
31   # version is also the default in the wheels on Pypi that include binaries.
32   # is64bit: unfortunately the build would exhaust all possible memory on i686-linux.
33   MYPY_USE_MYPYC = stdenv.buildPlatform.is64bit;
35   meta = with lib; {
36     description = "Optional static typing for Python";
37     homepage    = "http://www.mypy-lang.org";
38     license     = licenses.mit;
39     maintainers = with maintainers; [ martingms lnl7 ];
40   };