at 23.05-pre 3.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, makeDesktopItem 6, atomicwrites 7, chardet 8, cloudpickle 9, cookiecutter 10, diff-match-patch 11, flake8 12, intervaltree 13, jedi 14, jellyfish 15, keyring 16, matplotlib 17, mccabe 18, nbconvert 19, numpy 20, numpydoc 21, psutil 22, pygments 23, pylint 24, pylint-venv 25, pyls-spyder 26, pyopengl 27, pyqtwebengine 28, python-lsp-black 29, python-lsp-server 30, pyxdg 31, pyzmq 32, pycodestyle 33, qdarkstyle 34, qstylizer 35, qtawesome 36, qtconsole 37, qtpy 38, rope 39, Rtree 40, scipy 41, spyder-kernels 42, textdistance 43, three-merge 44, watchdog 45}: 46 47buildPythonPackage rec { 48 pname = "spyder"; 49 version = "5.4.0"; 50 format = "setuptools"; 51 52 disabled = pythonOlder "3.7"; 53 54 src = fetchPypi { 55 inherit pname version; 56 hash = "sha256-nZ+rw5qALSdu+nbaAtGA7PLW6XjcjeZvuPd4a5WtZkw="; 57 }; 58 59 nativeBuildInputs = [ 60 pyqtwebengine.wrapQtAppsHook 61 ]; 62 63 propagatedBuildInputs = [ 64 atomicwrites 65 chardet 66 cloudpickle 67 cookiecutter 68 diff-match-patch 69 intervaltree 70 jedi 71 jellyfish 72 keyring 73 matplotlib 74 nbconvert 75 numpy 76 numpydoc 77 psutil 78 pygments 79 pylint-venv 80 pyls-spyder 81 pyopengl 82 pyqtwebengine 83 python-lsp-black 84 python-lsp-server 85 pyxdg 86 pyzmq 87 qdarkstyle 88 qstylizer 89 qtawesome 90 qtconsole 91 qtpy 92 rope 93 Rtree 94 scipy 95 spyder-kernels 96 textdistance 97 three-merge 98 watchdog 99 ] ++ python-lsp-server.optional-dependencies.all; 100 101 # There is no test for spyder 102 doCheck = false; 103 104 desktopItem = makeDesktopItem { 105 name = "Spyder"; 106 exec = "spyder"; 107 icon = "spyder"; 108 comment = "Scientific Python Development Environment"; 109 desktopName = "Spyder"; 110 genericName = "Python IDE"; 111 categories = [ "Development" "IDE" ]; 112 }; 113 114 postPatch = '' 115 # Remove dependency on pyqtwebengine 116 # This is still part of the pyqt 5.11 version we have in nixpkgs 117 sed -i /pyqtwebengine/d setup.py 118 substituteInPlace setup.py \ 119 --replace "qdarkstyle>=3.0.2,<3.1.0" "qdarkstyle" \ 120 --replace "ipython>=7.31.1,<8.0.0" "ipython" 121 ''; 122 123 postInstall = '' 124 # Add Python libs to env so Spyder subprocesses 125 # created to run compute kernels don't fail with ImportErrors 126 wrapProgram $out/bin/spyder --prefix PYTHONPATH : "$PYTHONPATH" 127 128 # Create desktop item 129 mkdir -p $out/share/icons 130 cp spyder/images/spyder.svg $out/share/icons 131 cp -r $desktopItem/share/applications/ $out/share 132 ''; 133 134 dontWrapQtApps = true; 135 136 preFixup = '' 137 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 138 ''; 139 140 meta = with lib; { 141 description = "Scientific python development environment"; 142 longDescription = '' 143 Spyder (previously known as Pydee) is a powerful interactive development 144 environment for the Python language with advanced editing, interactive 145 testing, debugging and introspection features. 146 ''; 147 homepage = "https://www.spyder-ide.org/"; 148 downloadPage = "https://github.com/spyder-ide/spyder/releases"; 149 changelog = "https://github.com/spyder-ide/spyder/blob/master/CHANGELOG.md"; 150 license = licenses.mit; 151 maintainers = with maintainers; [ gebner ]; 152 platforms = platforms.linux; 153 }; 154}