1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5
6 # nativeBuildInputs
7 pyqtwebengine,
8
9 # build-system
10 setuptools,
11
12 # dependencies
13 aiohttp,
14 asyncssh,
15 atomicwrites,
16 bcrypt,
17 chardet,
18 cloudpickle,
19 cookiecutter,
20 diff-match-patch,
21 fzf,
22 intervaltree,
23 ipython-pygments-lexers,
24 jedi,
25 jellyfish,
26 keyring,
27 matplotlib,
28 nbconvert,
29 numpy,
30 numpydoc,
31 packaging,
32 pickleshare,
33 psutil,
34 pygithub,
35 pygments,
36 pylint-venv,
37 pyls-spyder,
38 pyopengl,
39 python-lsp-black,
40 python-lsp-server,
41 pyuca,
42 pyzmq,
43 qdarkstyle,
44 qstylizer,
45 qtawesome,
46 qtconsole,
47 qtpy,
48 rope,
49 rtree,
50 scipy,
51 spyder-kernels,
52 superqt,
53 textdistance,
54 three-merge,
55 watchdog,
56 yarl,
57}:
58
59buildPythonPackage rec {
60 pname = "spyder";
61 version = "6.1.0a2";
62 pyproject = true;
63
64 src = fetchPypi {
65 inherit pname version;
66 hash = "sha256-KbGfG9T3XkYXntIQx325mYb0Bh8c0idb+25awFlWD9s=";
67 };
68
69 patches = [ ./dont-clear-pythonpath.patch ];
70
71 nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
72
73 build-system = [ setuptools ];
74
75 pythonRelaxDeps = [
76 "ipython"
77 "python-lsp-server"
78 ];
79
80 dependencies = [
81 aiohttp
82 asyncssh
83 atomicwrites
84 bcrypt
85 chardet
86 cloudpickle
87 cookiecutter
88 diff-match-patch
89 fzf
90 intervaltree
91 ipython-pygments-lexers
92 jedi
93 jellyfish
94 keyring
95 matplotlib
96 nbconvert
97 numpy
98 numpydoc
99 packaging
100 pickleshare
101 psutil
102 pygithub
103 pygments
104 pylint-venv
105 pyls-spyder
106 pyopengl
107 pyqtwebengine
108 python-lsp-black
109 python-lsp-server
110 pyuca
111 pyzmq
112 qdarkstyle
113 qstylizer
114 qtawesome
115 qtconsole
116 qtpy
117 rope
118 rtree
119 scipy
120 spyder-kernels
121 superqt
122 textdistance
123 three-merge
124 watchdog
125 yarl
126 ]
127 ++ python-lsp-server.optional-dependencies.all;
128
129 # There is no test for spyder
130 doCheck = false;
131
132 postInstall = ''
133 # Add Python libs to env so Spyder subprocesses
134 # created to run compute kernels don't fail with ImportErrors
135 wrapProgram $out/bin/spyder --prefix PYTHONPATH : "$PYTHONPATH"
136 '';
137
138 dontWrapQtApps = true;
139
140 preFixup = ''
141 makeWrapperArgs+=("''${qtWrapperArgs[@]}")
142 '';
143
144 meta = {
145 description = "Scientific python development environment";
146 mainProgram = "spyder";
147 longDescription = ''
148 Spyder (previously known as Pydee) is a powerful interactive development
149 environment for the Python language with advanced editing, interactive
150 testing, debugging and introspection features.
151 '';
152 homepage = "https://www.spyder-ide.org/";
153 downloadPage = "https://github.com/spyder-ide/spyder/releases";
154 changelog = "https://github.com/spyder-ide/spyder/blob/v${version}/changelogs/Spyder-6.md";
155 license = lib.licenses.mit;
156 maintainers = with lib.maintainers; [ ];
157 platforms = lib.platforms.linux;
158 };
159}