python.pkgs.astroid: fix build
This commit is contained in:
parent
94d87e4c1e
commit
673d0bed95
@ -1,32 +1,25 @@
|
|||||||
{ lib, fetchPypi, buildPythonPackage, python, logilab_common, six
|
{ lib, fetchPypi, buildPythonPackage, pythonOlder, isPyPy
|
||||||
, lazy-object-proxy, wrapt, singledispatch, enum34, pythonOlder
|
, lazy-object-proxy, six, wrapt, typing, typed-ast
|
||||||
, backports_functools_lru_cache
|
, pytestrunner, pytest
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "astroid";
|
pname = "astroid";
|
||||||
version = "2.0.1";
|
version = "2.0.1";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.4";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "218e36cf8d98a42f16214e8670819ce307fa707d1dcf7f9af84c7aede1febc7f";
|
sha256 = "218e36cf8d98a42f16214e8670819ce307fa707d1dcf7f9af84c7aede1febc7f";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ logilab_common six lazy-object-proxy wrapt ]
|
# From astroid/__pkginfo__.py
|
||||||
++ lib.optionals (pythonOlder "3.4") [ enum34 singledispatch]
|
propagatedBuildInputs = [ lazy-object-proxy six wrapt ]
|
||||||
++ lib.optionals (pythonOlder "3.3") [ backports_functools_lru_cache ];
|
++ lib.optional (pythonOlder "3.5") typing
|
||||||
|
++ lib.optional (pythonOlder "3.7" && !isPyPy) typed-ast;
|
||||||
|
|
||||||
postPatch = ''
|
checkInputs = [ pytestrunner pytest ];
|
||||||
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; {
|
meta = with lib; {
|
||||||
description = "A abstract syntax tree for Python with inference support";
|
description = "A abstract syntax tree for Python with inference support";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user