nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 114 lines 2.5 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 pythonAtLeast, 7 pythonOlder, 8 9 # Build dependencies 10 setuptools, 11 12 # Runtime dependencies 13 decorator, 14 ipython-pygments-lexers, 15 jedi, 16 matplotlib-inline, 17 pexpect, 18 prompt-toolkit, 19 pygments, 20 stack-data, 21 traitlets, 22 typing-extensions, 23 24 # Optional dependencies 25 matplotlib, 26 27 # Reverse dependency 28 sage, 29 30 # Test dependencies 31 pickleshare, 32 pytest-asyncio, 33 pytestCheckHook, 34 testpath, 35}: 36 37buildPythonPackage (finalAttrs: { 38 pname = "ipython"; 39 version = "9.9.0"; 40 outputs = [ 41 "out" 42 "man" 43 ]; 44 pyproject = true; 45 46 src = fetchPypi { 47 inherit (finalAttrs) pname version; 48 hash = "sha256-SPvtGy3l4scXfu+hRKun/LgtrFFPCbV+KsnaNN21QiA="; 49 }; 50 51 build-system = [ setuptools ]; 52 53 dependencies = [ 54 decorator 55 ipython-pygments-lexers 56 jedi 57 matplotlib-inline 58 pexpect 59 prompt-toolkit 60 pygments 61 stack-data 62 traitlets 63 ] 64 ++ lib.optionals (pythonOlder "3.12") [ typing-extensions ]; 65 66 optional-dependencies = { 67 matplotlib = [ matplotlib ]; 68 }; 69 70 pythonImportsCheck = [ "IPython" ]; 71 72 preCheck = '' 73 export HOME=$TMPDIR 74 75 # doctests try to fetch an image from the internet 76 substituteInPlace pyproject.toml \ 77 --replace-fail '"--ipdoctest-modules",' '"--ipdoctest-modules", "--ignore=IPython/core/display.py",' 78 ''; 79 80 nativeCheckInputs = [ 81 pickleshare 82 pytest-asyncio 83 pytestCheckHook 84 testpath 85 ]; 86 87 disabledTests = [ 88 # UnboundLocalError: local variable 'child' referenced before assignment 89 "test_system_interrupt" 90 ] 91 ++ lib.optionals (pythonAtLeast "3.13") [ 92 # AttributeError: 'Pdb' object has no attribute 'curframe'. Did you mean: 'botframe'? 93 "test_run_debug_twice" 94 "test_run_debug_twice_with_breakpoint" 95 ] 96 ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ 97 # FileNotFoundError: [Errno 2] No such file or directory: 'pbpaste' 98 "test_clipboard_get" 99 ]; 100 101 passthru.tests = { 102 inherit sage; 103 }; 104 105 meta = { 106 description = "IPython: Productive Interactive Computing"; 107 downloadPage = "https://github.com/ipython/ipython/"; 108 homepage = "https://ipython.readthedocs.io/en/stable/"; 109 changelog = "https://github.com/ipython/ipython/blob/${finalAttrs.version}/docs/source/whatsnew/version${lib.versions.major finalAttrs.version}.rst"; 110 license = lib.licenses.bsd3; 111 maintainers = with lib.maintainers; [ bjornfor ]; 112 teams = [ lib.teams.jupyter ]; 113 }; 114})