From f8400b2cbd7acab5aec04d19396adaf04296746d Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sat, 21 Jan 2023 23:03:39 -0800 Subject: gnu: Add python-pypdf. * gnu/packages/pdf.scm (python-pypdf): New variable. * gnu/packages/patches/python-pypdf-annotate-tests-appropriately.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. Signed-off-by: Maxim Cournoyer --- gnu/packages/pdf.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'gnu/packages/pdf.scm') diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 4b9d0623fe..8f3bec35d6 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -1260,6 +1260,35 @@ (define-public pdf2svg converter using the Poppler and Cairo libraries.") (license license:gpl2+))) +(define-public python-pypdf + (package + (name "python-pypdf") + (version "3.2.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/py-pdf/pypdf") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1qwvjr694sabfblx22zd54b9ny40f2gbv3bv6q43myrlxwvvisk6")) + (patches (search-patches + "python-pypdf-annotate-tests-appropriately.patch")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-flit)) + (propagated-inputs (list python-typing-extensions)) + (home-page "https://github.com/py-pdf/pypdf") + (arguments + (list + ;; Disable tests that use the network and non-free assets. + #:test-flags #~(list "-m" "not external and not samples"))) + (synopsis "Python PDF library") + (description + "This package provides a PDF library capable of splitting, merging, +cropping, and transforming PDF files.") + (license license:bsd-3))) + (define-public python-pypdf2 (package (name "python-pypdf2") -- cgit v1.2.3