depot/third_party/nixpkgs/pkgs/development/python-modules/fpdf2/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

69 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, defusedxml
, pillow
, fonttools
, pytestCheckHook
, qrcode
, camelot
, uharfbuzz
, lxml
}:
buildPythonPackage rec {
pname = "fpdf2";
version = "2.7.7";
pyproject = true;
src = fetchFromGitHub {
owner = "py-pdf";
repo = "fpdf2";
rev = version;
hash = "sha256-6B68kwxAW3cHpwMTDhj3C4zEOR6o6USqpSXB7uxcEXs=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail "--cov=fpdf --cov-report=xml" ""
'';
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
defusedxml
pillow
fonttools
];
nativeCheckInputs = [
pytestCheckHook
qrcode
camelot
uharfbuzz
lxml
];
disabledTestPaths = [
"test/table/test_table_extraction.py" # tabula-py not packaged yet
"test/signing/test_sign.py" # endesive not packaged yet
];
disabledTests = [
"test_png_url" # tries to download file
"test_page_background" # tries to download file
"test_share_images_cache" # uses timing functions
];
meta = {
homepage = "https://github.com/py-pdf/fpdf2";
description = "Simple PDF generation for Python";
changelog = "https://github.com/py-pdf/fpdf2/blob/${version}/CHANGELOG.md";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [ jfvillablanca ];
};
}