2017-06-06 09:32:19 +00:00
|
|
|
{ lib, fetchPypi, buildPythonPackage, python, logilab_common, six
|
2017-05-27 10:23:41 +00:00
|
|
|
, lazy-object-proxy, wrapt, singledispatch, enum34, pythonOlder
|
|
|
|
, backports_functools_lru_cache
|
|
|
|
}:
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2017-05-27 10:23:41 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "astroid";
|
2018-02-03 09:51:20 +00:00
|
|
|
version = "1.6.1";
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2017-06-06 09:32:19 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-02-03 09:51:20 +00:00
|
|
|
sha256 = "f0a0e386dbca9f93ea9f3ea6f32b37a24720502b7baa9cb17c3976a680d43a06";
|
2017-05-27 10:23:41 +00:00
|
|
|
};
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2017-05-27 10:23:41 +00:00
|
|
|
propagatedBuildInputs = [ logilab_common six lazy-object-proxy wrapt ]
|
|
|
|
++ lib.optionals (pythonOlder "3.4") [ enum34 singledispatch]
|
|
|
|
++ lib.optionals (pythonOlder "3.3") [ backports_functools_lru_cache ];
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2017-05-27 10:23:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
cd astroid/tests
|
|
|
|
for i in $(ls unittest*); do mv -v $i test_$i; done
|
|
|
|
cd ../..
|
|
|
|
rm -vf astroid/tests/test_unittest_inference.py
|
|
|
|
rm -vf astroid/tests/test_unittest_manager.py
|
|
|
|
'';
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2017-05-27 10:23:41 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest discover
|
|
|
|
'';
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2017-05-27 10:23:41 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A abstract syntax tree for Python with inference support";
|
2017-11-10 21:13:27 +00:00
|
|
|
homepage = https://bitbucket.org/logilab/astroid;
|
2017-05-27 10:23:41 +00:00
|
|
|
license = licenses.lgpl2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
};
|
|
|
|
}
|