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
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user