diff options
author | Marius Bakke <marius@gnu.org> | 2022-01-12 18:17:14 +0100 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2022-01-12 23:50:16 +0100 |
commit | da5d0b10c4994cc4a4b3a74033111bb22cd8ebe5 (patch) | |
tree | 80afeb6b51fd18961125a07191d646cd2b9f6095 | |
parent | d7b15a363b807309b5332a94fdea196318c79773 (diff) | |
download | guix-da5d0b10c4994cc4a4b3a74033111bb22cd8ebe5.tar.gz |
gnu: python-pyls-black: Update to 0.4.7.
...and add support for PYTHON-LSP-SERVER while at it. * gnu/packages/python-xyz.scm (python-pyls-black): Update to 0.4.7. [source](modules, snippet): New fields. [propagated-inputs]: Remove PYTHON-TOML. Add PYTHON-TOMLI.
-rw-r--r-- | gnu/packages/python-xyz.scm | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index e212ae1557..912f7c6594 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1405,7 +1405,7 @@ approximate nearest neighbor search with Python bindings.") (define-public python-pyls-black (package (name "python-pyls-black") - (version "0.4.6") + (version "0.4.7") (source (origin ;; There are no tests in the PyPI tarball. @@ -1415,12 +1415,27 @@ approximate nearest neighbor search with Python bindings.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj")))) + (base32 "0bkhfnlik89j3yamr20br4wm8975f20v33wabi2nyxvj10whr5dj")) + ;; Patch to work with python-lsp-server. Taken from + ;; <https://github.com/rupert/pyls-black/pull/37>. + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "setup.cfg" + (("python-language-server") + "python-lsp-server")) + (substitute* '("pyls_black/plugin.py" "tests/test_plugin.py") + (("pyls_format_document") + "pylsp_format_document") + (("pyls_format_range") + "pylsp_format_range") + (("from pyls([ \\.])" _ char) + (string-append "from pylsp" char))))))) (build-system python-build-system) (arguments `(#:test-target "pytest")) (propagated-inputs - (list python-black python-language-server python-toml)) + (list python-black python-lsp-server python-tomli)) (native-inputs (list python-flake8 python-isort python-mypy python-pytest python-pytest-runner)) |