From 7096df961f91fbd739e45f7cd84024c68106391b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 10 Jun 2023 18:59:28 +0200 Subject: [PATCH] python311Packages.pynvim: remove pytest-runner - disable on unsupported Python releases - add pythonImportsCheck - add format - add changelog to meta --- .../python-modules/pynvim/default.nix | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/pynvim/default.nix b/pkgs/development/python-modules/pynvim/default.nix index a59c1a34b629..8bed5bf24d21 100644 --- a/pkgs/development/python-modules/pynvim/default.nix +++ b/pkgs/development/python-modules/pynvim/default.nix @@ -1,38 +1,47 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchPypi -, lib , msgpack , greenlet , pythonOlder , isPyPy -, pytest-runner }: buildPythonPackage rec { pname = "pynvim"; version = "0.4.3"; - disabled = pythonOlder "3.4"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; hash = "sha256-OnlTeL3l6AkvvrOhqZvpxhPSaFVC8dsOXG/UZ+7Vbf8="; }; - nativeBuildInputs = [ - pytest-runner + postPatch = '' + substituteInPlace setup.py \ + --replace " + pytest_runner" "" + ''; + + propagatedBuildInputs = [ + msgpack + ] ++ lib.optional (!isPyPy) [ + greenlet ]; - # Tests require pkgs.neovim, - # which we cannot add because of circular dependency. + # Tests require pkgs.neovim which we cannot add because of circular dependency doCheck = false; - propagatedBuildInputs = [ msgpack ] - ++ lib.optional (!isPyPy) greenlet; + pythonImportsCheck = [ + "pynvim" + ]; - meta = { + meta = with lib; { description = "Python client for Neovim"; - homepage = "https://github.com/neovim/python-client"; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ ]; + homepage = "https://github.com/neovim/pynvim"; + changelog = "https://github.com/neovim/pynvim/releases/tag/${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ ]; }; }