at 22.05-pre 1.1 kB view raw
1{ lib, stdenv, fetchPypi, buildPythonPackage, typed-ast, psutil, isPy3k 2, mypy-extensions 3, typing-extensions 4}: 5buildPythonPackage rec { 6 pname = "mypy"; 7 version = "0.812"; 8 disabled = !isPy3k; 9 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "069i9qnfanp7dn8df1vspnqb0flvsszzn22v00vj08nzlnd061yd"; 13 }; 14 15 propagatedBuildInputs = [ typed-ast psutil mypy-extensions typing-extensions ]; 16 17 # Tests not included in pip package. 18 doCheck = false; 19 20 pythonImportsCheck = [ 21 "mypy" 22 "mypy.types" 23 "mypy.api" 24 "mypy.fastparse" 25 "mypy.report" 26 "mypyc" 27 "mypyc.analysis" 28 ]; 29 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; 34 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 }; 41}