From abfbca91e70eb797a22f70697251662c339fc8de Mon Sep 17 00:00:00 2001 From: MetaDark Date: Tue, 11 Aug 2020 22:59:39 -0400 Subject: [PATCH] pythonPackages.debugpy: 1.0.0b12 -> 1.0.0 Also fixes the Python 2.7 build --- .../python-modules/debugpy/default.nix | 50 ++++++++++++++----- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix index 2d11dee64a8b..52f23f437a60 100644 --- a/pkgs/development/python-modules/debugpy/default.nix +++ b/pkgs/development/python-modules/debugpy/default.nix @@ -1,19 +1,30 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub -, substituteAll, gdb -, colorama, django, flask, gevent, psutil, pytest -, pytest-timeout, pytest_xdist, requests +{ lib +, stdenv +, buildPythonPackage +, fetchFromGitHub +, substituteAll +, gdb +, colorama +, flask +, psutil +, pytest-timeout +, pytest_xdist +, pytestCheckHook +, requests , isPy27 +, django +, gevent }: buildPythonPackage rec { pname = "debugpy"; - version = "1.0.0b12"; + version = "1.0.0"; src = fetchFromGitHub { owner = "Microsoft"; repo = pname; rev = "v${version}"; - sha256 = "0sz33aq5qldl7kh4qjf5w3d08l9s77ipcj4i9wfklj8f6vf9w1wh"; + sha256 = "1cxwbq97n5pfmq0hji1ybbc6i1jg5bjy830dq23zqxbwxxwjx98m"; }; patches = [ @@ -49,16 +60,31 @@ buildPythonPackage rec { )''; checkInputs = [ - colorama django flask gevent psutil pytest - pytest-timeout pytest_xdist requests + colorama + flask + psutil + pytest-timeout + pytest_xdist + pytestCheckHook + requests + ] ++ lib.optionals (!isPy27) [ + django + gevent ]; # Override default arguments in pytest.ini - checkPhase = "pytest --timeout 0 -n $NIX_BUILD_CORES" - # gevent fails to import zope.interface with Python 2.7 - + stdenv.lib.optionalString isPy27 " -k 'not test_gevent'"; + pytestFlagsArray = [ "--timeout=0" "-n=$NIX_BUILD_CORES" ]; - meta = with stdenv.lib; { + disabledTests = lib.optionals isPy27 [ + # django 1.11 is the last version to support Python 2.7 + # and is no longer built in nixpkgs + "django" + + # gevent fails to import zope.interface with Python 2.7 + "gevent" + ]; + + meta = with lib; { description = "An implementation of the Debug Adapter Protocol for Python"; homepage = "https://github.com/microsoft/debugpy"; license = licenses.mit;