3
0
Fork 0
forked from mirrors/nixpkgs

python310Packages.pygments: adopt, enable tests

This commit is contained in:
Sandro Jäckel 2022-05-04 19:06:43 +02:00 committed by Sandro Jäckel
parent 8e225170e2
commit 90157969cf
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
3 changed files with 47 additions and 29 deletions

View file

@ -1,28 +0,0 @@
{ lib
, buildPythonPackage
, fetchPypi
, docutils
}:
buildPythonPackage rec {
pname = "Pygments";
version = "2.11.2";
src = fetchPypi {
inherit pname version;
sha256 = "4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a";
};
propagatedBuildInputs = [ docutils ];
# Circular dependency with sphinx
doCheck = false;
pythonImportsCheck = [ "pygments" ];
meta = {
homepage = "https://pygments.org/";
description = "A generic syntax highlighter";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ ];
};
}

View file

@ -0,0 +1,46 @@
{ lib
, buildPythonPackage
, fetchPypi
, docutils
, lxml
, pytestCheckHook
, wcag-contrast-ratio
}:
let pygments = buildPythonPackage
rec {
pname = "pygments";
version = "2.11.2";
src = fetchPypi {
pname = "Pygments";
inherit version;
sha256 = "4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a";
};
propagatedBuildInputs = [
docutils
];
# circular dependencies if enabled by default
doCheck = false;
checkInputs = [
lxml
pytestCheckHook
wcag-contrast-ratio
];
pythonImportsCheck = [ "pygments" ];
passthru.tests = {
check = pygments.overridePythonAttrs (_: { doCheck = true; });
};
meta = with lib; {
homepage = "https://pygments.org/";
description = "A generic syntax highlighter";
license = licenses.bsd2;
maintainers = with maintainers; [ SuperSandro2000 ];
};
};
in pygments

View file

@ -7192,7 +7192,7 @@ in {
pygments-better-html = callPackage ../development/python-modules/pygments-better-html { };
pygments = callPackage ../development/python-modules/Pygments { };
pygments = callPackage ../development/python-modules/pygments { };
pygments-markdown-lexer = callPackage ../development/python-modules/pygments-markdown-lexer { };