From 904bb3585ddc5965b910375a5c3fa4738fffbf69 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 12 Feb 2021 15:42:25 +0100 Subject: [PATCH 1/3] python3Packages.astroid: 2.4.2 -> 2.5.0 --- .../python-modules/astroid/default.nix | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/astroid/default.nix b/pkgs/development/python-modules/astroid/default.nix index 49f04bcb9116..7ddc91b1a443 100644 --- a/pkgs/development/python-modules/astroid/default.nix +++ b/pkgs/development/python-modules/astroid/default.nix @@ -1,29 +1,34 @@ -{ lib, fetchPypi, buildPythonPackage, pythonOlder, isPyPy, pythonAtLeast -, lazy-object-proxy, six, wrapt, typing, typed-ast -, pytestrunner, pytest +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, isPyPy +, lazy-object-proxy +, wrapt +, typed-ast +, pytestCheckHook }: buildPythonPackage rec { pname = "astroid"; - version = "2.4.2"; + version = "2.5"; - disabled = pythonOlder "3.4" || pythonAtLeast "3.9"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703"; + sha256 = "03dzhjrsc5d2whyjngfrwvxn42058k0cjjr85x2wqzai8psr475k"; }; - postPatch = '' - substituteInPlace astroid/__pkginfo__.py --replace "lazy_object_proxy==1.4.*" "lazy_object_proxy" - ''; - # From astroid/__pkginfo__.py - propagatedBuildInputs = [ lazy-object-proxy six wrapt ] - ++ lib.optional (pythonOlder "3.5") typing - ++ lib.optional (!isPyPy) typed-ast; + propagatedBuildInputs = [ + lazy-object-proxy + wrapt + ] ++ lib.optional (!isPyPy && pythonOlder "3.8") typed-ast; - checkInputs = [ pytestrunner pytest ]; + checkInputs = [ + pytestCheckHook + ]; meta = with lib; { description = "An abstract syntax tree for Python with inference support"; From b79f09557ef025ad81f79283c556780f094cd037 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 18 Feb 2021 17:29:23 +0100 Subject: [PATCH 2/3] python3Packages.astroid: clarify license is lgpl2.1 or newer --- pkgs/development/python-modules/astroid/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/astroid/default.nix b/pkgs/development/python-modules/astroid/default.nix index 7ddc91b1a443..468488ec0cad 100644 --- a/pkgs/development/python-modules/astroid/default.nix +++ b/pkgs/development/python-modules/astroid/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { meta = with lib; { description = "An abstract syntax tree for Python with inference support"; homepage = "https://github.com/PyCQA/astroid"; - license = licenses.lgpl2; + license = licenses.lgpl21Plus; platforms = platforms.all; maintainers = with maintainers; [ nand0p ]; }; From da92fff6d1c79f3d8e9d3077c24f732447af289d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 25 Feb 2021 02:10:34 +0100 Subject: [PATCH 3/3] python3Packages.pylint: 2.6.2 -> 2.7.1 https://github.com/PyCQA/pylint/blob/pylint-2.7.1/ChangeLog#L5-L197 --- .../python-modules/pylint/default.nix | 73 ++++++++++++------- 1 file changed, 46 insertions(+), 27 deletions(-) diff --git a/pkgs/development/python-modules/pylint/default.nix b/pkgs/development/python-modules/pylint/default.nix index 19ffb6419d9a..a7606de3f347 100644 --- a/pkgs/development/python-modules/pylint/default.nix +++ b/pkgs/development/python-modules/pylint/default.nix @@ -1,50 +1,69 @@ -{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, astroid, installShellFiles, - isort, mccabe, pytestCheckHook, pytest-benchmark, pytestrunner, toml }: +{ stdenv +, lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, installShellFiles +, astroid +, isort +, mccabe +, toml +, pytest-benchmark +, pytest-xdist +, pytestCheckHook +}: buildPythonPackage rec { pname = "pylint"; - version = "2.6.2"; + version = "2.7.1"; - disabled = pythonOlder "3.5"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-cYt0eG6n7QeqDFi/VyFU1Geflg0m6WQcwd4gSjC4f8k="; + sha256 = "10nrvzk1naf5ryawmi59wp99k31053sz37q3x9li2hj2cf7i1kl1"; }; - nativeBuildInputs = [ pytestrunner installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + ]; - checkInputs = [ pytestCheckHook pytest-benchmark ]; + propagatedBuildInputs = [ + astroid + isort + mccabe + toml + ]; - propagatedBuildInputs = [ astroid isort mccabe toml ]; - - postPatch = lib.optionalString stdenv.isDarwin '' - # Remove broken darwin test - rm -vf pylint/test/test_functional.py + postInstall = '' + mkdir -p $out/share/emacs/site-lisp + cp -v "elisp/"*.el $out/share/emacs/site-lisp/ + installManPage man/*.1 ''; - disabledTests = [ - # https://github.com/PyCQA/pylint/issues/3198 - "test_by_module_statement_value" - # has issues with local directories - "test_version" - ] ++ lib.optionals stdenv.isDarwin [ - "test_parallel_execution" - "test_py3k_jobs_option" - ]; + checkInputs = [ + pytest-benchmark + pytest-xdist + pytestCheckHook + ]; + + dontUseSetuptoolsCheck = true; # calls executable in one of the tests preCheck = '' export PATH=$PATH:$out/bin ''; - dontUseSetuptoolsCheck = true; + pytestFlagsArray = [ + "-n auto" + ]; - postInstall = '' - mkdir -p $out/share/emacs/site-lisp - cp "elisp/"*.el $out/share/emacs/site-lisp/ - installManPage man/*.1 - ''; + disabledTests = lib.optionals stdenv.isDarwin [ + "test_parallel_execution" + "test_py3k_jobs_option" + ]; + + disabledTestPaths = lib.optional stdenv.isDarwin "pylint/test/test_functional.py"; meta = with lib; { homepage = "https://pylint.pycqa.org/";