From patchwork Sat Jan 13 22:21:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Figiel X-Patchwork-Id: 58854 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9A9BB27BBEA; Sat, 13 Jan 2024 22:26:26 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 61BD927BBE2 for ; Sat, 13 Jan 2024 22:26:25 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOmS7-00066i-GE; Sat, 13 Jan 2024 17:26:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOmS3-00066N-Ry for guix-patches@gnu.org; Sat, 13 Jan 2024 17:26:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rOmS3-0003Ka-Io for guix-patches@gnu.org; Sat, 13 Jan 2024 17:26:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rOmS2-0006fa-18 for guix-patches@gnu.org; Sat, 13 Jan 2024 17:26:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68437] [PATCH] gnu: Add python-pdf2image. Resent-From: Troy Figiel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Jan 2024 22:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68437 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68437@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170518471925567 (code B ref -1); Sat, 13 Jan 2024 22:26:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jan 2024 22:25:19 +0000 Received: from localhost ([127.0.0.1]:41288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOmRL-0006eJ-7w for submit@debbugs.gnu.org; Sat, 13 Jan 2024 17:25:19 -0500 Received: from lists.gnu.org ([2001:470:142::17]:35090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOmRJ-0006e2-Cs for submit@debbugs.gnu.org; Sat, 13 Jan 2024 17:25:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOmRD-00060M-CZ for guix-patches@gnu.org; Sat, 13 Jan 2024 17:25:11 -0500 Received: from mout-p-103.mailbox.org ([80.241.56.161]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rOmRB-0002uD-Iz for guix-patches@gnu.org; Sat, 13 Jan 2024 17:25:11 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4TCCdX5B47z9snK for ; Sat, 13 Jan 2024 23:25:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1705184704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=DxvaJhAxxHJ/CmnR3AMyUqV5P+aTH4bSLcGaUYpMavw=; b=MOvdOeBe4gNlCKO64B6LV+ocu3UvYutwbf8DVtkws/AWqN3jCGKj5RN7xbqcNH84FV/7/l BLvJzHGOyMLuf0e+rb5qucNNFUiCrXCn50IdAD4sCHk6I86/UGfxJP67pc8iZ7Q9I4VZ9+ L7Qd2fqvRs2eKSYgKGqysl9F8T7cpnhYvdOZRISc4QQRf6K2s5n3hsUlvpOc3/AY81rVjv ZEcOHSbNv5Ms7nUHO3HF7qd3cDzJoU2cPgtSdsI6WwVNUg4fQA7Gj/s3pAPLUF6X2J3qdv doIZDyNPd/gIIEDva2ZgtnV2tyPo/ONOQoFm0+ij3Mdt5+xGKhd+srwMZLg0Bg== From: Troy Figiel Date: Sat, 13 Jan 2024 23:21:44 +0100 Message-ID: <87mst83m84.fsf@troyfigiel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=80.241.56.161; envelope-from=troy@troyfigiel.com; helo=mout-p-103.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-pdf2image): New variable. --- gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) base-commit: 31e736dac29e6f0ff8a2de3f28e210a68684ad21 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")