at 22.05-pre 3.1 kB view raw
1{ lib, buildPythonPackage, fetchPypi, isPy27, makeDesktopItem, intervaltree, 2 jedi, pycodestyle, psutil, rope, numpy, scipy, matplotlib, pylint, 3 keyring, numpydoc, qtconsole, qtawesome, nbconvert, mccabe, pyopengl, 4 cloudpickle, pygments, spyder-kernels, qtpy, pyzmq, chardet, qdarkstyle, 5 watchdog, python-language-server, pyqtwebengine, atomicwrites, pyxdg, 6 diff-match-patch, three-merge, pyls-black, pyls-spyder, flake8, textdistance 7}: 8 9buildPythonPackage rec { 10 pname = "spyder"; 11 version = "5.1.5"; 12 13 disabled = isPy27; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "f9ce23187f5de18f489fb03c38d884e4484b9c7292f9831faaa029fb7752fc93"; 18 }; 19 20 nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ]; 21 22 propagatedBuildInputs = [ 23 intervaltree jedi pycodestyle psutil rope numpy scipy matplotlib pylint keyring 24 numpydoc qtconsole qtawesome nbconvert mccabe pyopengl cloudpickle spyder-kernels 25 pygments qtpy pyzmq chardet pyqtwebengine qdarkstyle watchdog python-language-server 26 atomicwrites pyxdg diff-match-patch three-merge pyls-black pyls-spyder 27 flake8 textdistance 28 ]; 29 30 # There is no test for spyder 31 doCheck = false; 32 33 desktopItem = makeDesktopItem { 34 name = "Spyder"; 35 exec = "spyder"; 36 icon = "spyder"; 37 comment = "Scientific Python Development Environment"; 38 desktopName = "Spyder"; 39 genericName = "Python IDE"; 40 categories = "Development;IDE;"; 41 }; 42 43 postPatch = '' 44 # remove dependency on pyqtwebengine 45 # this is still part of the pyqt 5.11 version we have in nixpkgs 46 sed -i /pyqtwebengine/d setup.py 47 # The major version bump in watchdog is due to changes in supported 48 # platforms, not API break. 49 # https://github.com/gorakhargosh/watchdog/issues/761#issuecomment-777001518 50 substituteInPlace setup.py \ 51 --replace "pyqt5<5.13" "pyqt5" \ 52 --replace "parso==0.7.0" "parso" \ 53 --replace "watchdog>=0.10.3,<2.0.0" "watchdog>=0.10.3,<3.0.0" 54 ''; 55 56 postInstall = '' 57 # add Python libs to env so Spyder subprocesses 58 # created to run compute kernels don't fail with ImportErrors 59 wrapProgram $out/bin/spyder --prefix PYTHONPATH : "$PYTHONPATH" 60 61 # Create desktop item 62 mkdir -p $out/share/icons 63 cp spyder/images/spyder.svg $out/share/icons 64 cp -r $desktopItem/share/applications/ $out/share 65 ''; 66 67 dontWrapQtApps = true; 68 69 preFixup = '' 70 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 71 ''; 72 73 meta = with lib; { 74 description = "Scientific python development environment"; 75 longDescription = '' 76 Spyder (previously known as Pydee) is a powerful interactive development 77 environment for the Python language with advanced editing, interactive 78 testing, debugging and introspection features. 79 ''; 80 homepage = "https://www.spyder-ide.org/"; 81 downloadPage = "https://github.com/spyder-ide/spyder/releases"; 82 changelog = "https://github.com/spyder-ide/spyder/blob/master/CHANGELOG.md"; 83 license = licenses.mit; 84 platforms = platforms.linux; 85 maintainers = with maintainers; [ gebner ]; 86 }; 87}