1{ lib, fetchPypi, buildPythonPackage, pythonOlder, isPyPy
2, lazy-object-proxy, six, wrapt, typing, typed-ast
3, pytestrunner, pytest
4}:
5
6buildPythonPackage rec {
7 pname = "astroid";
8 version = "2.4.2";
9
10 disabled = pythonOlder "3.4";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703";
15 };
16
17 postPatch = ''
18 substituteInPlace astroid/__pkginfo__.py --replace "lazy_object_proxy==1.4.*" "lazy_object_proxy"
19 '';
20
21 # From astroid/__pkginfo__.py
22 propagatedBuildInputs = [ lazy-object-proxy six wrapt ]
23 ++ lib.optional (pythonOlder "3.5") typing
24 ++ lib.optional (!isPyPy) typed-ast;
25
26 checkInputs = [ pytestrunner pytest ];
27
28 meta = with lib; {
29 description = "An abstract syntax tree for Python with inference support";
30 homepage = "https://github.com/PyCQA/astroid";
31 license = licenses.lgpl2;
32 platforms = platforms.all;
33 maintainers = with maintainers; [ nand0p ];
34 };
35}