mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 11:17:45 +00:00
python311Packages.ansiwrap: patch test
This commit is contained in:
parent
54cfd5cded
commit
e5dca17201
@ -1,16 +1,18 @@
|
||||
{ lib
|
||||
, ansicolors
|
||||
, buildPythonPackage
|
||||
, coverage
|
||||
, fetchPypi
|
||||
, pytest-cov
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, textwrap3
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ansiwrap";
|
||||
version = "0.8.4";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
@ -18,21 +20,31 @@ buildPythonPackage rec {
|
||||
sha256 = "ca0c740734cde59bf919f8ff2c386f74f9a369818cdc60efe94893d01ea8d9b7";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
postPatch = ''
|
||||
# https://github.com/jonathaneunice/ansiwrap/issues/18
|
||||
substituteInPlace test/test_ansiwrap.py \
|
||||
--replace "set(range(20, 120)).difference(LINE_LENGTHS)" "sorted(set(range(20, 120)).difference(LINE_LENGTHS))" \
|
||||
--replace "set(range(120, 400)).difference(LINE_LENGTHS)" "sorted(set(range(120, 400)).difference(LINE_LENGTHS))"
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
ansicolors
|
||||
coverage
|
||||
pytest-cov
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ textwrap3 ];
|
||||
propagatedBuildInputs = [
|
||||
textwrap3
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "ansiwrap" ];
|
||||
pythonImportsCheck = [
|
||||
"ansiwrap"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Textwrap, but savvy to ANSI colors and styles";
|
||||
homepage = "https://github.com/jonathaneunice/ansiwrap";
|
||||
changelog = "https://github.com/jonathaneunice/ansiwrap/blob/master/CHANGES.yml";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.costrouc ];
|
||||
maintainers = with maintainers; [ costrouc ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user