2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2018-12-13 06:05:46 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
|
|
|
, requests
|
|
|
|
, process-tests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "manhole";
|
2021-03-26 14:33:11 +00:00
|
|
|
version = "1.7.0";
|
2018-12-13 06:05:46 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-26 14:33:11 +00:00
|
|
|
sha256 = "224985bf1dd032f2dc0ca4107f727835b6f50e1df6d78781d6c9f4cae8b585e2";
|
2018-12-13 06:05:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# test_help expects architecture-dependent Linux signal numbers.
|
|
|
|
#
|
|
|
|
# {test_locals,test_socket_path} fail to remove /tmp/manhole-socket
|
|
|
|
# on the x86_64-darwin builder.
|
2018-12-22 09:53:35 +00:00
|
|
|
#
|
|
|
|
# TODO: change this back to `doCheck = stdenv.isLinux` after
|
|
|
|
# https://github.com/ionelmc/python-manhole/issues/54 is fixed
|
|
|
|
doCheck = false;
|
2018-12-13 06:05:46 +00:00
|
|
|
|
|
|
|
checkInputs = [ pytest requests process-tests ];
|
|
|
|
checkPhase = ''
|
|
|
|
# Based on its tox.ini
|
|
|
|
export PYTHONUNBUFFERED=yes
|
|
|
|
export PYTHONPATH=.:tests:$PYTHONPATH
|
|
|
|
|
|
|
|
# The tests use manhole-cli
|
|
|
|
export PATH="$PATH:$out/bin"
|
|
|
|
|
|
|
|
# test_uwsgi fails with:
|
|
|
|
# http.client.RemoteDisconnected: Remote end closed connection without response
|
|
|
|
py.test -vv -k "not test_uwsgi"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/ionelmc/python-manhole";
|
2018-12-13 06:05:46 +00:00
|
|
|
description = "Debugging manhole for Python applications";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ ivan ];
|
|
|
|
};
|
|
|
|
}
|