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