python310Packages.qrcode: propagate setuptools

The console script imports pkg_resources at runtime.

Also add a test, that calls the executable and verifies the version.
This commit is contained in:
Martin Weinelt 2023-05-16 20:52:50 +02:00
parent 5ff8d2f12c
commit eefbea9557
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -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";