From 6be140d621c89e37bb5eeea5338d50f4eb3ef20e Mon Sep 17 00:00:00 2001 From: Fernando J Pando Date: Thu, 2 Mar 2017 20:51:55 -0500 Subject: [PATCH 1/2] pylint: 1.5.4 -> 1.6.5 - tested on nixos - tested on darwin --- .../python-modules/pylint/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 26 +----------- 2 files changed, 43 insertions(+), 25 deletions(-) create mode 100644 pkgs/development/python-modules/pylint/default.nix diff --git a/pkgs/development/python-modules/pylint/default.nix b/pkgs/development/python-modules/pylint/default.nix new file mode 100644 index 00000000000..844d2e22954 --- /dev/null +++ b/pkgs/development/python-modules/pylint/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, buildPythonPackage, python, astroid, isort, + pytest, mccabe, configparser, backports_functools_lru_cache }: + + buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "pylint"; + version = "1.6.5"; + + src = fetchurl { + url = "mirror://pypi/p/${pname}/${name}.tar.gz"; + sha256 = "06b78nl996949a7h01c4ycy8779hl5cm7vpxij5lm3npim59hwx6"; + }; + + buildInputs = [ pytest mccabe configparser backports_functools_lru_cache ]; + + propagatedBuildInputs = [ astroid isort ]; + + postPatch = '' + # Remove broken darwin tests + sed -i -e '/test_parallel_execution/,+2d' pylint/test/test_self.py + sed -i -e '/test_py3k_jobs_option/,+4d' pylint/test/test_self.py + rm -vf pylint/test/test_functional.py + ''; + + checkPhase = '' + cd pylint/test + ${python.interpreter} -m unittest discover -p "*test*" + ''; + + postInstall = '' + mkdir -p $out/share/emacs/site-lisp + cp "elisp/"*.el $out/share/emacs/site-lisp/ + ''; + + meta = with stdenv.lib; { + homepage = http://www.logilab.org/project/pylint; + description = "A bug and style checker for Python"; + platform = platforms.all; + license = licenses.gpl1Plus; + maintainers = with maintainers; [ nand0p ]; + }; + } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3a92359cb9a..7ef9cfdb102 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20380,31 +20380,7 @@ in { }; }; - pylint = buildPythonPackage rec { - name = "pylint-${version}"; - version = "1.5.4"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pylint/${name}.tar.gz"; - sha256 = "2fe3cc2fc66a56fdc35dbbc2bf1dd96a534abfc79ee6b2ad9ae4fe166e570c4b"; - }; - - propagatedBuildInputs = with self; [ astroid ]; - - checkPhase = '' - cd pylint/test; ${python.interpreter} -m unittest discover -p "*test*" - ''; - - postInstall = '' - mkdir -p $out/share/emacs/site-lisp - cp "elisp/"*.el $out/share/emacs/site-lisp/ - ''; - - meta = { - homepage = http://www.logilab.org/project/pylint; - description = "A bug and style checker for Python"; - }; - }; + pylint = callPackage ../development/python-modules/pylint { }; pyopencl = callPackage ../development/python-modules/pyopencl { }; From f40b0f5e3741bd01142574db6eb54a748e19149b Mon Sep 17 00:00:00 2001 From: Fernando J Pando Date: Thu, 2 Mar 2017 21:05:54 -0500 Subject: [PATCH 2/2] astroid: 1.4.4 -> 1.4.9 --- .../python-modules/astroid/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 24 +------------ 2 files changed, 35 insertions(+), 23 deletions(-) create mode 100644 pkgs/development/python-modules/astroid/default.nix 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";