From 7db4bc88ac97894eba76dcba521c9a72653049ac Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 29 Nov 2023 01:16:17 +0100 Subject: [PATCH] python311Packages.readchar: fix version, use pep517 builder Checking runtime dependencies for inquirer-3.1.3-py3-none-any.whl - readchar>=3.0.6 not satisifeid by version 4.0.5.dev0 --- pkgs/development/python-modules/readchar/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/readchar/default.nix b/pkgs/development/python-modules/readchar/default.nix index 8517bb34654f..aab318a38178 100644 --- a/pkgs/development/python-modules/readchar/default.nix +++ b/pkgs/development/python-modules/readchar/default.nix @@ -2,6 +2,9 @@ , buildPythonPackage , fetchFromGitHub +# build-system +, setuptools + # tests , pytestCheckHook , pexpect @@ -10,7 +13,7 @@ buildPythonPackage rec { pname = "readchar"; version = "4.0.5"; - format = "setuptools"; + pyproject = true; # Don't use wheels on PyPI src = fetchFromGitHub { @@ -22,13 +25,18 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.cfg \ - --replace "--cov=readchar" "" + --replace "--cov=readchar" "" \ + --replace "attr: readchar.__version__" "${version}" # run Linux tests on Darwin as well # see https://github.com/magmax/python-readchar/pull/99 for why this is not upstreamed substituteInPlace tests/linux/conftest.py \ --replace 'sys.platform.startswith("linux")' 'sys.platform.startswith(("darwin", "linux"))' ''; + nativeBuildInputs = [ + setuptools + ]; + pythonImportsCheck = [ "readchar" ]; nativeCheckInputs = [