pythonPackages.prompt-toolkit: cleanup, use pytestCheckHook

This commit is contained in:
Sandro Jäckel 2021-07-22 17:03:03 +02:00
parent 183c7ebcae
commit a70d00f984
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
2 changed files with 26 additions and 19 deletions

View file

@ -1,7 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, pytestCheckHook
, docopt
, six
, wcwidth
@ -9,22 +9,24 @@
}:
buildPythonPackage rec {
pname = "prompt_toolkit";
pname = "prompt-toolkit";
version = "1.0.18";
src = fetchPypi {
inherit pname version;
pname = "prompt_toolkit";
inherit version;
sha256 = "dd4fca02c8069497ad931a2d09914c6b0d1b50151ce876bc15bde4c747090126";
};
checkPhase = ''
rm prompt_toolkit/win32_types.py
py.test -k 'not test_pathcompleter_can_expanduser'
'';
checkInputs = [ pytest ];
propagatedBuildInputs = [ docopt six wcwidth pygments ];
meta = {
checkInputs = [ pytestCheckHook ];
disabledTests = [
"test_pathcompleter_can_expanduser"
];
meta = with lib; {
description = "Python library for building powerful interactive command lines";
longDescription = ''
prompt_toolkit could be a replacement for readline, but it can be
@ -33,6 +35,7 @@ buildPythonPackage rec {
with a nice interactive Python shell (called ptpython) built on top.
'';
homepage = "https://github.com/jonathanslenders/python-prompt-toolkit";
license = lib.licenses.bsd3;
maintainers = with maintainers; [ ];
license = licenses.bsd3;
};
}

View file

@ -1,27 +1,30 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, pytestCheckHook
, six
, wcwidth
}:
buildPythonPackage rec {
pname = "prompt_toolkit";
pname = "prompt-toolkit";
version = "3.0.19";
src = fetchPypi {
inherit pname version;
pname = "prompt_toolkit";
inherit version;
sha256 = "08360ee3a3148bdb5163621709ee322ec34fc4375099afa4bbf751e9b7b7fa4f";
};
checkPhase = ''
py.test -k 'not test_pathcompleter_can_expanduser'
'';
checkInputs = [ pytest ];
propagatedBuildInputs = [ six wcwidth ];
meta = {
checkInputs = [ pytestCheckHook ];
disabledTests = [
"test_pathcompleter_can_expanduser"
];
meta = with lib; {
description = "Python library for building powerful interactive command lines";
longDescription = ''
prompt_toolkit could be a replacement for readline, but it can be
@ -30,6 +33,7 @@ buildPythonPackage rec {
with a nice interactive Python shell (called ptpython) built on top.
'';
homepage = "https://github.com/jonathanslenders/python-prompt-toolkit";
license = lib.licenses.bsd3;
maintainers = with maintainers; [ ];
license = licenses.bsd3;
};
}