1{ lib, stdenv 2, buildPythonPackage 3, fetchPypi 4, pytest 5, requests 6, process-tests 7}: 8 9buildPythonPackage rec { 10 pname = "manhole"; 11 version = "1.8.0"; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "bada20a25b547b395d472e2e08928f0437df26bbdbda4797c55863198e29a21f"; 16 }; 17 18 # test_help expects architecture-dependent Linux signal numbers. 19 # 20 # {test_locals,test_socket_path} fail to remove /tmp/manhole-socket 21 # on the x86_64-darwin builder. 22 # 23 # TODO: change this back to `doCheck = stdenv.isLinux` after 24 # https://github.com/ionelmc/python-manhole/issues/54 is fixed 25 doCheck = false; 26 27 nativeCheckInputs = [ pytest requests process-tests ]; 28 checkPhase = '' 29 # Based on its tox.ini 30 export PYTHONUNBUFFERED=yes 31 export PYTHONPATH=.:tests:$PYTHONPATH 32 33 # The tests use manhole-cli 34 export PATH="$PATH:$out/bin" 35 36 # test_uwsgi fails with: 37 # http.client.RemoteDisconnected: Remote end closed connection without response 38 py.test -vv -k "not test_uwsgi" 39 ''; 40 41 meta = with lib; { 42 homepage = "https://github.com/ionelmc/python-manhole"; 43 description = "Debugging manhole for Python applications"; 44 license = licenses.bsd2; 45 maintainers = with maintainers; [ ivan ]; 46 }; 47}