git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #41061 from Mic92/python-language-server

python.pkgs.python-language-server: init at 0.18.0

commitdccd2e9a9b58311b6c74189eb295cec035ceae98 authorJörg Thalheim <Mic92@users.noreply.github.com> dateFri 25 May 2018, 11:27 (9 years ago) parent0ea8a4b88b94b7
9 files changed+139−9
pkgs/applications/science/spyder/default.nix+1−1 pkgs/development/python-modules/jedi/default.nix+2−2 pkgs/development/tools/mypy/default.nix → pkgs/development/python-modules/mypy/default.nix+4−2 pkgs/development/python-modules/parso/default.nix+3−3 pkgs/development/python-modules/pyls-isort/default.nix+29 pkgs/development/python-modules/pyls-mypy/default.nix+43 pkgs/development/python-modules/python-language-server/default.nix+48 pkgs/top-level/all-packages.nix+1−1 pkgs/top-level/python-packages.nix+8
pkgs/applications/science/spyder/default.nix+1−1
@@ -19,7 +19,7 @@ buildPythonApplication rec {
1919
2020 # Somehow setuptools can't find pyqt5. Maybe because the dist-info folder is missing?
2121 postPatch = ''
22− substituteInPlace setup.py --replace 'pyqt5;python_version>="3"' ' '
22+ sed -i -e '/pyqt5/d' setup.py
2323 '';
2424
2525 propagatedBuildInputs = [
pkgs/development/python-modules/jedi/default.nix+2−2
@@ -2,12 +2,12 @@
22
33buildPythonPackage rec {
44 pname = "jedi";
5− version = "0.11.1";
5+ version = "0.12.0";
66 name = "${pname}-${version}";
77
88 src = fetchPypi {
99 inherit pname version;
10− sha256 = "d6e799d04d1ade9459ed0f20de47c32f2285438956a677d083d3c98def59fa97";
10+ sha256 = "1bcr7csx4xil1iwmk03d79jis0bkmgi9k0kir3xa4rmwqsagcwhr";
1111 };
1212
1313 postPatch = ''
pkgs/development/tools/mypy/default.nix → pkgs/development/python-modules/mypy/default.nixrenamed+4−2
@@ -1,6 +1,6 @@
1−{ stdenv, fetchPypi, buildPythonApplication, lxml, typed-ast, psutil }:
1+{ stdenv, fetchPypi, buildPythonPackage, lxml, typed-ast, psutil, isPy3k }:
22
3−buildPythonApplication rec {
3+buildPythonPackage rec {
44 pname = "mypy";
55 version = "0.600";
66
@@ -12,6 +12,8 @@ buildPythonApplication rec {
1212 sha256 = "1pd3kkz435wlvi9fwqbi3xag5zs59jcjqi6c9gzdjdn23friq9dw";
1313 };
1414
15+ disabled = !isPy3k;
16+
1517 propagatedBuildInputs = [ lxml typed-ast psutil ];
1618
1719 meta = with stdenv.lib; {
pkgs/development/python-modules/parso/default.nix+3−3
@@ -6,12 +6,12 @@
66
77buildPythonPackage rec {
88 pname = "parso";
9− version = "0.1.1";
9+ version = "0.2.0";
1010 name = "${pname}-${version}";
1111
1212 src = fetchPypi {
1313 inherit pname version;
14− sha256 = "5815f3fe254e5665f3c5d6f54f086c2502035cb631a91341591b5a564203cffb";
14+ sha256 = "0lamywk6dm5xshlkdvxxf5j6fa2k2zpi7xagf0bwidaay3vnpgb2";
1515 };
1616
1717 checkInputs = [ pytest ];
@@ -22,4 +22,4 @@ buildPythonPackage rec {
2222 license = lib.licenses.mit;
2323 };
2424
25−}
25+}
pkgs/development/python-modules/pyls-isort/default.nixnew file+29
@@ -0,0 +1,29 @@
1+{ lib, buildPythonPackage, fetchFromGitHub
2+, python-language-server, isort
3+}:
4+
5+buildPythonPackage rec {
6+ pname = "pyls-isort";
7+ version = "0.1.1";
8+
9+ src = fetchFromGitHub {
10+ owner = "paradoxxxzero";
11+ repo = "pyls-isort";
12+ rev = version;
13+ sha256 = "0mf8c6dw5lsj9np20p0vrhr1yfycq2awjk2pil28l579xj9nr0dc";
14+ };
15+
16+ # no tests
17+ doCheck = false;
18+
19+ propagatedBuildInputs = [
20+ isort python-language-server
21+ ];
22+
23+ meta = with lib; {
24+ homepage = https://github.com/palantir/python-language-server;
25+ description = "An implementation of the Language Server Protocol for Python";
26+ license = licenses.mit;
27+ maintainers = [ maintainers.mic92 ];
28+ };
29+}
pkgs/development/python-modules/pyls-mypy/default.nixnew file+43
@@ -0,0 +1,43 @@
1+{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch
2+, future, python-language-server, mypy, configparser
3+, pytest, mock, isPy3k, pytestcov, coverage
4+}:
5+
6+buildPythonPackage rec {
7+ pname = "pyls-mypy";
8+ version = "0.1.2";
9+
10+ src = fetchFromGitHub {
11+ owner = "tomv564";
12+ repo = "pyls-mypy";
13+ rev = version;
14+ sha256 = "0wa038a8a8yj3wmrc7q909nj4b5d3lq70ysbw7rpsnyb0x06m826";
15+ };
16+
17+ disabled = !isPy3k;
18+
19+ patches = [
20+ # also part of https://github.com/tomv564/pyls-mypy/pull/10
21+ (fetchpatch {
22+ url = "https://github.com/Mic92/pyls-mypy/commit/4c727120d2cbd8bf2825e1491cd55175f03266d2.patch";
23+ sha256 = "1dgn5z742swpxwknmgvm65jpxq9zwzhggw4nl6ys7yw8r49kqgrl";
24+ })
25+ ];
26+
27+ checkPhase = ''
28+ HOME=$TEMPDIR pytest
29+ '';
30+
31+ checkInputs = [ pytest mock pytestcov coverage ];
32+
33+ propagatedBuildInputs = [
34+ mypy python-language-server future configparser
35+ ];
36+
37+ meta = with lib; {
38+ homepage = https://github.com/palantir/python-language-server;
39+ description = "An implementation of the Language Server Protocol for Python";
40+ license = licenses.mit;
41+ maintainers = [ maintainers.mic92 ];
42+ };
43+}
pkgs/development/python-modules/python-language-server/default.nixnew file+48
@@ -0,0 +1,48 @@
1+{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27
2+, configparser, futures, future, jedi, pluggy
3+, pytest, mock, pytestcov, coverage
4+# The following packages are optional and
5+# can be overwritten with null as your liking.
6+# This also requires to disable tests.
7+, rope ? null
8+, mccabe ? null
9+, pyflakes ? null
10+, pycodestyle ? null
11+, autopep8 ? null
12+, yapf ? null
13+, pydocstyle ? null
14+}:
15+
16+buildPythonPackage rec {
17+ pname = "python-language-server";
18+ version = "0.18.0";
19+
20+ src = fetchFromGitHub {
21+ owner = "palantir";
22+ repo = "python-language-server";
23+ rev = version;
24+ sha256 = "0ig34bc0qm6gdj8xakmm3877lmf8ms7qg0xj8hay9gpgf8cz894s";
25+ };
26+
27+ checkInputs = [
28+ pytest mock pytestcov coverage
29+ # rope is technically a dependency, but we don't add it by default since we
30+ # already have jedi, which is the preferred option
31+ rope
32+ ];
33+ checkPhase = ''
34+ HOME=$TEMPDIR pytest
35+ '';
36+
37+ propagatedBuildInputs = [
38+ jedi pluggy mccabe pyflakes pycodestyle yapf pydocstyle future autopep8
39+ ] ++ lib.optional (isPy27) [ configparser ]
40+ ++ lib.optional (pythonOlder "3.2") [ futures ];
41+
42+ meta = with lib; {
43+ homepage = https://github.com/palantir/python-language-server;
44+ description = "An implementation of the Language Server Protocol for Python";
45+ license = licenses.mit;
46+ maintainers = [ maintainers.mic92 ];
47+ };
48+}
pkgs/top-level/all-packages.nix+1−1
@@ -8493,7 +8493,7 @@ with pkgs;
84938493
84948494 grabserial = callPackage ../development/tools/grabserial { };
84958495
8496− mypy = python3Packages.callPackage ../development/tools/mypy { };
8496+ mypy = python3Packages.mypy;
84978497
84988498 ### DEVELOPMENT / LIBRARIES
84998499
pkgs/top-level/python-packages.nix+8
@@ -8088,6 +8088,8 @@ in {
80888088
80898089 mysqlclient = callPackage ../development/python-modules/mysqlclient { };
80908090
8091+ mypy = callPackage ../development/python-modules/mypy { };
8092+
80918093 mwclient = buildPythonPackage rec {
80928094 version = "0.8.3";
80938095 pname = "mwclient";
@@ -11266,6 +11268,12 @@ in {
1126611268 buildInputs = with self; [ pyasn1 pycrypto ];
1126711269 };
1126811270
11271+ python-language-server = callPackage ../development/python-modules/python-language-server {};
11272+
11273+ pyls-mypy = callPackage ../development/python-modules/pyls-mypy {};
11274+
11275+ pyls-isort = callPackage ../development/python-modules/pyls-isort {};
11276+
1126911277 pyudev = callPackage ../development/python-modules/pyudev {
1127011278 inherit (pkgs) fetchurl systemd;
1127111279 };