From eefbea9557f23bbe16027d7b0fe5f82d62e6ef29 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 16 May 2023 20:52:50 +0200 Subject: [PATCH] python310Packages.qrcode: propagate setuptools The console script imports pkg_resources at runtime. Also add a test, that calls the executable and verifies the version. --- pkgs/development/python-modules/qrcode/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/qrcode/default.nix b/pkgs/development/python-modules/qrcode/default.nix index 57aec55c4637..43379422263d 100644 --- a/pkgs/development/python-modules/qrcode/default.nix +++ b/pkgs/development/python-modules/qrcode/default.nix @@ -7,6 +7,8 @@ , typing-extensions , mock , pytestCheckHook +, testers +, qrcode }: buildPythonPackage rec { @@ -26,6 +28,8 @@ buildPythonPackage rec { propagatedBuildInputs = [ typing-extensions pypng + # imports pkg_resouces in console_scripts.py + setuptools ]; passthru.optional-dependencies.pil = [ @@ -37,6 +41,13 @@ buildPythonPackage rec { pytestCheckHook ] ++ passthru.optional-dependencies.pil; + passthru.tests = { + version = testers.testVersion { + package = qrcode; + command = "qr --version"; + }; + }; + meta = with lib; { description = "Python QR Code image generator"; homepage = "https://github.com/lincolnloop/python-qrcode";