Merge pull request #126636 from lukegb/py-bump-typed-ast

authored by

Sandro and committed by
GitHub
8e70649e 740d9fe0

+28 -8
+28 -8
pkgs/development/python-modules/typed-ast/default.nix
··· 1 - { buildPythonPackage, fetchFromGitHub, lib, pythonOlder }: 1 + { buildPythonPackage, fetchFromGitHub, lib, pythonOlder, pytest }: 2 2 buildPythonPackage rec { 3 3 pname = "typed-ast"; 4 - version = "1.4.1"; 5 - src = fetchFromGitHub{ 4 + version = "1.4.3"; 5 + src = fetchFromGitHub { 6 6 owner = "python"; 7 7 repo = "typed_ast"; 8 8 rev = version; 9 - sha256 = "086r9qhls6mz1w72a6d1ld3m4fbkxklf6mgwbs8wpw0zlxjm7y40"; 9 + sha256 = "16mn9snwik5n2ib65sw2xcaqdm02j8ps21zgjxf8kyy7qnx2mx4w"; 10 10 }; 11 11 # Only works with Python 3.3 and newer; 12 12 disabled = pythonOlder "3.3"; 13 - # No tests in archive 14 - doCheck = false; 13 + 14 + pythonImportsCheck = [ 15 + "typed_ast" 16 + "typed_ast.ast27" 17 + "typed_ast.ast3" 18 + "typed_ast.conversions" 19 + ]; 20 + 21 + checkInputs = [ 22 + pytest 23 + ]; 24 + checkPhase = '' 25 + runHook preCheck 26 + 27 + # We can't use pytestCheckHook because that invokes pytest with python -m pytest 28 + # which adds the current directory to sys.path at the beginning. 29 + # _That_ version of the typed_ast module doesn't have the C extensions we need. 30 + pytest 31 + 32 + runHook postCheck 33 + ''; 34 + 15 35 meta = { 16 - homepage = "https://pypi.python.org/pypi/typed-ast"; 17 - description = "a fork of Python 2 and 3 ast modules with type comment support"; 36 + homepage = "https://github.com/python/typed_ast"; 37 + description = "Python 2 and 3 ast modules with type comment support"; 18 38 license = lib.licenses.asl20; 19 39 }; 20 40 }