1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonAtLeast,
6 pythonOlder,
7 decorator,
8 ipython,
9 isPyPy,
10 exceptiongroup,
11 tomli,
12 setuptools,
13 pytestCheckHook,
14 pytest-timeout,
15}:
16
17buildPythonPackage rec {
18 pname = "ipdb";
19 version = "0.13.13";
20 format = "pyproject";
21
22 disabled = isPyPy; # setupterm: could not find terminfo database
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-46xgGO8FEm1EKvaAqthjAG7BnQIpBWGsiLixwLDPxyY=";
27 };
28
29 nativeBuildInputs = [ setuptools ];
30
31 propagatedBuildInputs = [
32 ipython
33 decorator
34 ]
35 ++ lib.optionals (pythonOlder "3.11") [
36 exceptiongroup
37 tomli
38 ];
39
40 nativeCheckInputs = [ pytestCheckHook ];
41
42 preCheck = ''
43 export HOME=$(mktemp -d)
44 '';
45
46 disabledTestPaths = [
47 # OSError: pytest: reading from stdin while output is captured! Consider using `-s`.
48 "manual_test.py"
49 ]
50 ++ lib.optionals (pythonAtLeast "3.13") [
51 # tests get stuck
52 "tests/test_opts.py"
53 ];
54
55 meta = with lib; {
56 homepage = "https://github.com/gotcha/ipdb";
57 description = "IPython-enabled pdb";
58 mainProgram = "ipdb3";
59 license = licenses.bsd0;
60 maintainers = [ ];
61 };
62}