From: Troy Figiel <troy@troyfigiel.com>
To: 68437@debbugs.gnu.org
Subject: [bug#68437] [PATCH] gnu: Add python-pdf2image.
Date: Sat, 13 Jan 2024 23:21:44 +0100 [thread overview]
Message-ID: <87mst83m84.fsf@troyfigiel.com> (raw)
* gnu/packages/python-xyz.scm (python-pdf2image): New variable.
---
gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 37d7dd0dd5..889ee9c69c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8874,6 +8874,39 @@ (define-public python-pypdf3
retrieve text and metadata from PDFs as well as merge entire files together.")
(license license:bsd-3)))
+(define-public python-pdf2image
+ (package
+ (name "python-pdf2image")
+ (version "1.17.0")
+ ;; No tests in the PyPI tarball.
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Belval/pdf2image")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0xd8q939zqa8flfcdhbgyadiwqb8sgnd42cbr6n1l2jl9fnix45v"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; The following excluded tests assume hardcoded binary paths to
+ ;; /usr/bin/pdftoppm and /usr/bin/pdftocairo.
+ '(#:test-flags '("--exclude=^test_use_poppler_path$"
+ "--exclude=^test_use_poppler_path_with_trailing_slash$")))
+ (propagated-inputs (list python-pillow))
+ (inputs (list poppler))
+ (native-inputs (list python-nose which))
+ (home-page "https://github.com/Belval/pdf2image")
+ (synopsis
+ "Python wrapper around @command{pdftoppm} and @command{pdftocairo}")
+ (description
+ "This package provides a Python API wrapping the @command{pdftoppm} and
+@command{pdftocairo} command line tools. It can convert @file{PDF} files to a
+Python list with elements of type @code{PIL.Image} (from the
+@code{python-pillow} library).")
+ (license license:expat)))
+
(define-public python-pikepdf
(package
(name "python-pikepdf")
base-commit: 31e736dac29e6f0ff8a2de3f28e210a68684ad21
--
2.42.0
next reply other threads:[~2024-01-13 22:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-13 22:21 Troy Figiel [this message]
2024-01-17 9:57 ` bug#68437: [PATCH] gnu: Add python-pdf2image Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mst83m84.fsf@troyfigiel.com \
--to=troy@troyfigiel.com \
--cc=68437@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).