Unverified Commit b64bda66 authored by Jann Marc Villablanca's avatar Jann Marc Villablanca Committed by GitHub
Browse files

python311Packages.fpdf2: init at 2.7.6 (#271076)

parent 07572b13
Loading
Loading
Loading
Loading
+67 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub

, setuptools

, defusedxml
, pillow
, fonttools

, pytestCheckHook
, qrcode
, camelot
, uharfbuzz
}:

buildPythonPackage rec {
  pname = "fpdf2";
  version = "2.7.6";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "py-pdf";
    repo = "fpdf2";
    rev = version;
    hash = "sha256-wiCKmS+GlrYV2/6TEdXUbmWIMWU4hyzswFJZR9EOWxc=";
  };

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace "--cov=fpdf --cov-report=xml" ""
  '';

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [
    defusedxml
    pillow
    fonttools
  ];

  nativeCheckInputs = [
    pytestCheckHook
    qrcode
    camelot
    uharfbuzz
  ];

  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 ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -4261,6 +4261,8 @@ self: super: with self; {
  fpdf = callPackage ../development/python-modules/fpdf { };
  fpdf2 = callPackage ../development/python-modules/fpdf2 { };
  fpylll = callPackage ../development/python-modules/fpylll { };
  fpyutils = callPackage ../development/python-modules/fpyutils { };