3
0
Fork 0
forked from mirrors/nixpkgs

pythonPackages.debugpy: 1.0.0b12 -> 1.0.0

Also fixes the Python 2.7 build
This commit is contained in:
MetaDark 2020-08-11 22:59:39 -04:00
parent e7fe577d98
commit abfbca91e7

View file

@ -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;