python3.pkgs.ansi2html: dependency cleanup (#247246)

Some dependencies can be removed, and some build dependencies need to
be added to prepare for stricter dependency validation.
This commit is contained in:
Theodore Ni 2023-08-08 03:45:14 -07:00 committed by GitHub
parent 94ea536fc7
commit f6332ded45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,22 +1,42 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k, six, mock, pytestCheckHook, setuptools, setuptools-scm }:
{ lib
, buildPythonPackage
, fetchpatch
, fetchPypi
, pytestCheckHook
, setuptools
, setuptools-scm
, wheel
}:
buildPythonPackage rec {
pname = "ansi2html";
version = "1.8.0";
format = "pyproject";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
hash = "sha256-OLgqKYSCofomE/D5yb6z23Ko+DLurFjrLke/Ms039tU=";
};
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ six setuptools ];
patches = [
(fetchpatch {
name = "update-build-requirements.patch";
url = "https://github.com/pycontribs/ansi2html/commit/be9c47dd39e500b2e34e95efde90d0a3b44daaee.patch";
hash = "sha256-nvOclsgysg+4sK694ppls0BLfq5MCJJQW3V/Ru30D/k=";
})
];
nativeBuildInputs = [
setuptools
setuptools-scm
wheel
];
preCheck = "export PATH=$PATH:$out/bin";
nativeCheckInputs = [ mock pytestCheckHook ];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "ansi2html" ];