From 673d0bed95420f8b8b6b740be9daf68bf42ffb70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 24 Jul 2018 01:08:05 +0200 Subject: [PATCH] python.pkgs.astroid: fix build --- .../python-modules/astroid/default.nix | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/astroid/default.nix b/pkgs/development/python-modules/astroid/default.nix index dc132f911477..ea087ce4f5fb 100644 --- a/pkgs/development/python-modules/astroid/default.nix +++ b/pkgs/development/python-modules/astroid/default.nix @@ -1,32 +1,25 @@ -{ lib, fetchPypi, buildPythonPackage, python, logilab_common, six -, lazy-object-proxy, wrapt, singledispatch, enum34, pythonOlder -, backports_functools_lru_cache +{ lib, fetchPypi, buildPythonPackage, pythonOlder, isPyPy +, lazy-object-proxy, six, wrapt, typing, typed-ast +, pytestrunner, pytest }: buildPythonPackage rec { pname = "astroid"; version = "2.0.1"; + disabled = pythonOlder "3.4"; + 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 ]; + # From astroid/__pkginfo__.py + propagatedBuildInputs = [ lazy-object-proxy six wrapt ] + ++ lib.optional (pythonOlder "3.5") typing + ++ lib.optional (pythonOlder "3.7" && !isPyPy) typed-ast; - 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 - ''; + checkInputs = [ pytestrunner pytest ]; meta = with lib; { description = "A abstract syntax tree for Python with inference support";