diff --git a/pkgs/development/python-modules/astroid/default.nix b/pkgs/development/python-modules/astroid/default.nix new file mode 100644 index 00000000000..76f58e695f2 --- /dev/null +++ b/pkgs/development/python-modules/astroid/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchurl, buildPythonPackage, python, logilab_common, six, + lazy-object-proxy, wrapt }: + + buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "astroid"; + version = "1.4.9"; + + src = fetchurl { + url = "mirror://pypi/a/${pname}/${name}.tar.gz"; + sha256 = "1mw5q20b80j55vbpcdfl824sbb1q15dhkfbczjnnv8733j4yg0x4"; + }; + + propagatedBuildInputs = [ logilab_common six lazy-object-proxy wrapt ]; + + 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 + ''; + + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + + meta = with stdenv.lib; { + description = "A abstract syntax tree for Python with inference support"; + homepage = http://bitbucket.org/logilab/astroid; + license = licenses.lgpl2; + platform = platforms.all; + maintainers = with maintainers; [ nand0p ]; + }; + } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7ef9cfdb102..d17233eb656 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1369,29 +1369,7 @@ in { }; }); - astroid = buildPythonPackage rec { - name = "astroid-1.4.4"; - - propagatedBuildInputs = with self; [ logilab_common six lazy-object-proxy wrapt ]; - - src = pkgs.fetchurl { - url = "mirror://pypi/a/astroid/${name}.tar.gz"; - sha256 = "7f7e5512efe515098e77cbd3a60e87c8db8954097b0e025d8d6f72f2e8ddc298"; - }; - - checkPhase = '' - ${python.interpreter} -m unittest discover - ''; - - # Tests cannot be found because they're named unittest_... - # instead of test_... - - meta = { - description = "A abstract syntax tree for Python with inference support"; - homepage = http://bitbucket.org/logilab/astroid; - license = with licenses; [ lgpl2 ]; - }; - }; + astroid = callPackage ../development/python-modules/astroid { }; attrdict = buildPythonPackage (rec { name = "attrdict-2.0.0";