2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
|
|
|
, requests
|
|
|
|
, process-tests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "manhole";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.8.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "bada20a25b547b395d472e2e08928f0437df26bbdbda4797c55863198e29a21f";
|
2020-04-24 23:36:52 +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.
|
|
|
|
#
|
|
|
|
# TODO: change this back to `doCheck = stdenv.isLinux` after
|
|
|
|
# https://github.com/ionelmc/python-manhole/issues/54 is fixed
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytest requests process-tests ];
|
2020-04-24 23:36:52 +00:00
|
|
|
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-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ionelmc/python-manhole";
|
|
|
|
description = "Debugging manhole for Python applications";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "manhole-cli";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ ivan ];
|
|
|
|
};
|
|
|
|
}
|