nixpkgs/pkgs/development/python-modules/astroid/default.nix
2018-07-22 16:52:34 +02:00

39 lines
1.1 KiB
Nix

{ lib, fetchPypi, buildPythonPackage, python, logilab_common, six
, lazy-object-proxy, wrapt, singledispatch, enum34, pythonOlder
, backports_functools_lru_cache
}:
buildPythonPackage rec {
pname = "astroid";
version = "2.0.1";
src = fetchPypi {
inherit pname version;
sha256 = "218e36cf8d98a42f16214e8670819ce307fa707d1dcf7f9af84c7aede1febc7f";
};
propagatedBuildInputs = [ logilab_common six lazy-object-proxy wrapt ]
++ lib.optionals (pythonOlder "3.4") [ enum34 singledispatch]
++ lib.optionals (pythonOlder "3.3") [ backports_functools_lru_cache ];
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
'';
checkPhase = ''
${python.interpreter} -m unittest discover
'';
meta = with lib; {
description = "A abstract syntax tree for Python with inference support";
homepage = https://bitbucket.org/logilab/astroid;
license = licenses.lgpl2;
platforms = platforms.all;
maintainers = with maintainers; [ nand0p ];
};
}