1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/astroid/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2017-06-06 10:32:19 +01:00
{ lib, fetchPypi, buildPythonPackage, python, logilab_common, six
2017-05-27 11:23:41 +01:00
, lazy-object-proxy, wrapt, singledispatch, enum34, pythonOlder
, backports_functools_lru_cache
}:
2017-03-03 02:05:54 +00:00
2017-05-27 11:23:41 +01:00
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "astroid";
2017-06-06 10:32:19 +01:00
version = "1.5.3";
2017-03-03 02:05:54 +00:00
2017-06-06 10:32:19 +01:00
src = fetchPypi {
inherit pname version;
sha256 = "492c2a2044adbf6a84a671b7522e9295ad2f6a7c781b899014308db25312dd35";
2017-05-27 11:23:41 +01:00
};
2017-03-03 02:05:54 +00:00
2017-05-27 11:23:41 +01: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 11:23:41 +01: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 11:23:41 +01:00
checkPhase = ''
${python.interpreter} -m unittest discover
'';
2017-03-03 02:05:54 +00:00
2017-05-27 11:23:41 +01:00
meta = with lib; {
description = "A abstract syntax tree for Python with inference support";
homepage = https://bitbucket.org/logilab/astroid;
2017-05-27 11:23:41 +01:00
license = licenses.lgpl2;
platforms = platforms.all;
maintainers = with maintainers; [ nand0p ];
};
}