From f6332ded451f1acc9b176a6dd180b1a073f8b509 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Tue, 8 Aug 2023 03:45:14 -0700 Subject: [PATCH] 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. --- .../python-modules/ansi2html/default.nix | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/ansi2html/default.nix b/pkgs/development/python-modules/ansi2html/default.nix index 97553b1b31e1..192ecaf2eab4 100644 --- a/pkgs/development/python-modules/ansi2html/default.nix +++ b/pkgs/development/python-modules/ansi2html/default.nix @@ -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" ];