2018-07-24 02:08:05 +03:00
|
|
|
{ lib, fetchPypi, buildPythonPackage, pythonOlder, isPyPy
|
|
|
|
, lazy-object-proxy, six, wrapt, typing, typed-ast
|
|
|
|
, pytestrunner, pytest
|
2017-05-27 13:23:41 +03:00
|
|
|
}:
|
2017-03-03 05:05:54 +03:00
|
|
|
|
2017-05-27 13:23:41 +03:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astroid";
|
2020-07-31 11:56:35 +03:00
|
|
|
version = "2.4.2";
|
2017-03-03 05:05:54 +03:00
|
|
|
|
2018-07-24 02:08:05 +03:00
|
|
|
disabled = pythonOlder "3.4";
|
|
|
|
|
2017-06-06 12:32:19 +03:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-31 11:56:35 +03:00
|
|
|
sha256 = "2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703";
|
2017-05-27 13:23:41 +03:00
|
|
|
};
|
2017-03-03 05:05:54 +03:00
|
|
|
|
2020-06-07 12:50:01 +03:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace astroid/__pkginfo__.py --replace "lazy_object_proxy==1.4.*" "lazy_object_proxy"
|
|
|
|
'';
|
|
|
|
|
2018-07-24 02:08:05 +03:00
|
|
|
# From astroid/__pkginfo__.py
|
|
|
|
propagatedBuildInputs = [ lazy-object-proxy six wrapt ]
|
|
|
|
++ lib.optional (pythonOlder "3.5") typing
|
2019-05-18 00:25:19 +03:00
|
|
|
++ lib.optional (!isPyPy) typed-ast;
|
2017-03-03 05:05:54 +03:00
|
|
|
|
2018-07-24 02:08:05 +03:00
|
|
|
checkInputs = [ pytestrunner pytest ];
|
2017-03-03 05:05:54 +03:00
|
|
|
|
2017-05-27 13:23:41 +03:00
|
|
|
meta = with lib; {
|
2018-08-31 01:28:38 +03:00
|
|
|
description = "An abstract syntax tree for Python with inference support";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://github.com/PyCQA/astroid";
|
2017-05-27 13:23:41 +03:00
|
|
|
license = licenses.lgpl2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
};
|
|
|
|
}
|