git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #120884 from eduardosm/spyder

spyder: fix build

commit24063d067f434de0d03e8a0f15437ae08b9dc1be authorGabriel Ebner <gebner@gebner.org> dateTue 27 Apr 2021, 18:41 (6 years ago) parent681c2cbf9776d3
4 files changed+40−4
pkgs/development/python-modules/python-language-server/default.nix+7 pkgs/development/python-modules/spyder/default.nix+8−4 pkgs/development/python-modules/textdistance/default.nix+23 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/python-language-server/default.nix+7
@@ -30,6 +30,13 @@ buildPythonPackage rec {
3030 sha256 = "07x6jr4z20jxn03bxblwc8vk0ywha492cgwfhj7q97nb5cm7kx0q";
3131 };
3232
33+ postPatch = ''
34+ # Reading the changelog I don't expect an API break in pycodestyle and pyflakes
35+ substituteInPlace setup.py \
36+ --replace "pycodestyle>=2.6.0,<2.7.0" "pycodestyle>=2.6.0,<2.8.0" \
37+ --replace "pyflakes>=2.2.0,<2.3.0" "pyflakes>=2.2.0,<2.4.0"
38+ '';
39+
3340 propagatedBuildInputs = [ setuptools jedi pluggy future python-jsonrpc-server ujson ]
3441 ++ lib.optional (withProvider "autopep8") autopep8
3542 ++ lib.optional (withProvider "mccabe") mccabe
pkgs/development/python-modules/spyder/default.nix+8−4
@@ -3,7 +3,7 @@
33 keyring, numpydoc, qtconsole, qtawesome, nbconvert, mccabe, pyopengl,
44 cloudpickle, pygments, spyder-kernels, qtpy, pyzmq, chardet, qdarkstyle,
55 watchdog, python-language-server, pyqtwebengine, atomicwrites, pyxdg,
6− diff-match-patch, three-merge, pyls-black, pyls-spyder, flake8
6+ diff-match-patch, three-merge, pyls-black, pyls-spyder, flake8, textdistance
77}:
88
99buildPythonPackage rec {
@@ -20,11 +20,11 @@ buildPythonPackage rec {
2020 nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
2121
2222 propagatedBuildInputs = [
23− intervaltree jedi pycodestyle psutil pyflakes rope numpy scipy matplotlib pylint keyring
23+ intervaltree jedi pycodestyle psutil rope numpy scipy matplotlib pylint keyring
2424 numpydoc qtconsole qtawesome nbconvert mccabe pyopengl cloudpickle spyder-kernels
2525 pygments qtpy pyzmq chardet pyqtwebengine qdarkstyle watchdog python-language-server
2626 atomicwrites pyxdg diff-match-patch three-merge pyls-black pyls-spyder
27− flake8
27+ flake8 textdistance
2828 ];
2929
3030 # There is no test for spyder
@@ -44,9 +44,13 @@ buildPythonPackage rec {
4444 # remove dependency on pyqtwebengine
4545 # this is still part of the pyqt 5.11 version we have in nixpkgs
4646 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
4750 substituteInPlace setup.py \
4851 --replace "pyqt5<5.13" "pyqt5" \
49− --replace "parso==0.7.0" "parso"
52+ --replace "parso==0.7.0" "parso" \
53+ --replace "watchdog>=0.10.3,<2.0.0" "watchdog>=0.10.3,<3.0.0"
5054 '';
5155
5256 postInstall = ''
pkgs/development/python-modules/textdistance/default.nixnew file+23
@@ -0,0 +1,23 @@
1+{ lib, buildPythonPackage, fetchPypi }:
2+
3+buildPythonPackage rec {
4+ pname = "textdistance";
5+ version = "4.2.1";
6+
7+ src = fetchPypi {
8+ inherit pname version;
9+ sha256 = "114j3ignw4y9yq1cp08p4bfw518vyr3p0h8ba2mikwy74qxxzy26";
10+ };
11+
12+ # There aren't tests
13+ doCheck = false;
14+
15+ pythonImportsCheck = [ "textdistance" ];
16+
17+ meta = with lib; {
18+ description = "Python library for comparing distance between two or more sequences";
19+ homepage = "https://github.com/life4/textdistance";
20+ license = licenses.mit;
21+ maintainers = with maintainers; [ eduardosm ];
22+ };
23+}
pkgs/top-level/python-packages.nix+2
@@ -7962,6 +7962,8 @@ in {
79627962
79637963 test-tube = callPackage ../development/python-modules/test-tube { };
79647964
7965+ textdistance = callPackage ../development/python-modules/textdistance { };
7966+
79657967 textacy = callPackage ../development/python-modules/textacy { };
79667968
79677969 texttable = callPackage ../development/python-modules/texttable { };