git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #126636 from lukegb/py-bump-typed-ast
commit8e70649e484393a0dc5dd1aa72a6c55c743e9d64 authorSandro <sandro.jaeckel@gmail.com> dateSun 13 Jun 2021, 02:32 (5 years ago) parent740d9fe0f6a466
1 file changed+28−8
pkgs/development/python-modules/typed-ast/default.nix+28−8
pkgs/development/python-modules/typed-ast/default.nix+28−8
@@ -1,20 +1,40 @@
1−{ buildPythonPackage, fetchFromGitHub, lib, pythonOlder }:
1+{ buildPythonPackage, fetchFromGitHub, lib, pythonOlder, pytest }:
22buildPythonPackage rec {
33 pname = "typed-ast";
4− version = "1.4.1";
5− src = fetchFromGitHub{
4+ version = "1.4.3";
5+ src = fetchFromGitHub {
66 owner = "python";
77 repo = "typed_ast";
88 rev = version;
9− sha256 = "086r9qhls6mz1w72a6d1ld3m4fbkxklf6mgwbs8wpw0zlxjm7y40";
9+ sha256 = "16mn9snwik5n2ib65sw2xcaqdm02j8ps21zgjxf8kyy7qnx2mx4w";
1010 };
1111 # Only works with Python 3.3 and newer;
1212 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+
1535 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";
1838 license = lib.licenses.asl20;
1939 };
2040}