Merge pull request #183862 from jyooru/fix/python3Packages.python-lsp-server

python3Packages.python-lsp-server: fix build

authored by

Kira Bruneau and committed by
GitHub
4ef10c96 58cf7ac8

+38 -3
+6 -3
pkgs/development/python-modules/python-lsp-server/default.nix
··· 23 23 , setuptools-scm 24 24 , stdenv 25 25 , ujson 26 + , whatthepatch 26 27 , yapf 27 28 , withAutopep8 ? true 28 29 , withFlake8 ? true ··· 50 51 }; 51 52 52 53 postPatch = '' 53 - substituteInPlace setup.cfg \ 54 + substituteInPlace pyproject.toml \ 54 55 --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ 55 56 --replace "--cov pylsp --cov test" "" \ 56 57 --replace "mccabe>=0.6.0,<0.7.0" "mccabe" ··· 75 76 ++ lib.optional withPyflakes pyflakes 76 77 ++ lib.optional withPylint pylint 77 78 ++ lib.optional withRope rope 78 - ++ lib.optional withYapf yapf; 79 + ++ lib.optionals withYapf [ whatthepatch yapf ]; 79 80 80 81 checkInputs = [ 81 82 flaky ··· 87 88 # pyqt5 is broken on aarch64-darwin 88 89 ++ lib.optionals (!stdenv.isDarwin || !stdenv.isAarch64) [ pyqt5 ]; 89 90 90 - disabledTests = lib.optional (!withPycodestyle) "test_workspace_loads_pycodestyle_config" 91 + disabledTests = [ 92 + "test_numpy_completions" # https://github.com/python-lsp/python-lsp-server/issues/243 93 + ] ++ lib.optional (!withPycodestyle) "test_workspace_loads_pycodestyle_config" 91 94 # pyqt5 is broken on aarch64-darwin 92 95 ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "test_pyqt_completion"; 93 96
+30
pkgs/development/python-modules/whatthepatch/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , pytestCheckHook 5 + }: 6 + 7 + buildPythonPackage rec { 8 + pname = "whatthepatch"; 9 + version = "1.0.2"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "cscorley"; 13 + repo = pname; 14 + rev = version; 15 + hash = "sha256-0l/Ebq7Js9sKFJ/RzkQ1aWEDCxt+COVd2qVnLSWwFx0="; 16 + }; 17 + 18 + checkInputs = [ 19 + pytestCheckHook 20 + ]; 21 + 22 + pythonImportsCheck = [ "whatthepatch" ]; 23 + 24 + meta = with lib; { 25 + description = "Python library for both parsing and applying patch files"; 26 + homepage = "https://github.com/cscorley/whatthepatch"; 27 + license = licenses.mit; 28 + maintainers = with maintainers; [ jyooru ]; 29 + }; 30 + }
+2
pkgs/top-level/python-packages.nix
··· 11369 11369 11370 11370 wget = callPackage ../development/python-modules/wget { }; 11371 11371 11372 + whatthepatch = callPackage ../development/python-modules/whatthepatch { }; 11373 + 11372 11374 wheel = callPackage ../development/python-modules/wheel { }; 11373 11375 11374 11376 wheel-filename = callPackage ../development/python-modules/wheel-filename { };