From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2JPKN9Fd+mRmRAAAG6o9tA:P1 (envelope-from ) for ; Fri, 08 Sep 2023 01:33:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2JPKN9Fd+mRmRAAAG6o9tA (envelope-from ) for ; Fri, 08 Sep 2023 01:33:38 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9D3CF538D2 for ; Fri, 8 Sep 2023 01:33:37 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694129617; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=71uj6LDtf8pEZJ30E4b0g2g33xWF07dy+EGLaxcm1yY=; b=hk1FF1J8HQzrW1XNkpS0KSIQXAFlgK5dBlv3Kon+YraaxLkg1urW3V6pnbhucuB92FhIBu lmgYR5TovJ797J6I0tYMecmpKE0ILnbJrr1IK58mMzNa4C4JgbylAAWHQDtaRFz022on+C kuKb9a3BiSD0y04dbt+yzKUwi69YWNa7U9sDFGv+EPmD6PDTOqZcX/hngRiXsN5hw2ygWO rr49GrrVWwADAamrYKEKmNT0fgl6Iqos7hma+Sr+AOU58cGy1Kzg7M8axVVIC4mvss9YeG FU4klkQclEJmlCgjd50V1pEYTB/MBRvx3LJcOc9J2zCQu5G1xZXT7GoWQOnfbA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694129617; a=rsa-sha256; cv=none; b=lP9qmsjrB31INIGmasvpOUVX65r2UcXrXhGQATG6sBe/9BnegGUA6xvfyhcIloBTe67HR6 n6qZyUWSTeejLhx9s4Kvs5Z9l2qLLK5mgye+gadRLcbaR3d85swGuf4hda/WRpJhoYKTzH IFy8Az2ML/gmanYmbqYe9q+kV4LV7og89e2aw/eosmhXp8O+00U9Dz/eXUXy0NuSdMi+e6 SXN474UEJkyELciXlBN8AUih8ZS8Y0buNSq6Q+byuD5dnkuJI4y+hyPZjRXXfqPGL8/cno epy0Q/l9bMSdYuSIvZgqUkjKt2B7IjNXnoiUikhKVj2hh1N9ZnhDPuwkZtI5SA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeOUh-0001gY-Nc; Thu, 07 Sep 2023 19:33:03 -0400 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 1qeOUf-0001fv-8P for guix-patches@gnu.org; Thu, 07 Sep 2023 19:33:01 -0400 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 1qeOUf-0006Xi-0Y for guix-patches@gnu.org; Thu, 07 Sep 2023 19:33:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qeOUg-0000V0-6e for guix-patches@gnu.org; Thu, 07 Sep 2023 19:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65806] [PATCH 1/4] gnu: Add python-pymupdf. References: <87edjaj9kb.fsf@ngraves.fr> In-Reply-To: <87edjaj9kb.fsf@ngraves.fr> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Sep 2023 23:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65806@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 65806-submit@debbugs.gnu.org id=B65806.16941295571868 (code B ref 65806); Thu, 07 Sep 2023 23:33:02 +0000 Received: (at 65806) by debbugs.gnu.org; 7 Sep 2023 23:32:37 +0000 Received: from localhost ([127.0.0.1]:41734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeOUG-0000U2-RW for submit@debbugs.gnu.org; Thu, 07 Sep 2023 19:32:37 -0400 Received: from 4.mo583.mail-out.ovh.net ([178.33.111.247]:53243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeOU9-0000TN-Su for 65806@debbugs.gnu.org; Thu, 07 Sep 2023 19:32:34 -0400 Received: from director1.ghost.mail-out.ovh.net (unknown [10.109.143.216]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id 0044F25208 for <65806@debbugs.gnu.org>; Thu, 7 Sep 2023 23:32:25 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-h4tdv (unknown [10.110.171.164]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id B07091FD42; Thu, 7 Sep 2023 23:32:25 +0000 (UTC) Received: from ngraves.fr ([37.59.142.102]) by ghost-submission-6684bf9d7b-h4tdv with ESMTPSA id YEBzKIld+mRPEgMAerS5MA (envelope-from ); Thu, 07 Sep 2023 23:32:25 +0000 X-OVh-ClientIp: 81.67.140.142 Date: Fri, 8 Sep 2023 01:32:10 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 6739918318147003106 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrudehiedgvdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepteeffefhfffhjeevleeuvdehgffgveekheeuhfekhfehuefgheffhedugfegleeinecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegtddrudegvddpfeejrdehledrudegvddruddtvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepieehkedtieesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekfedpmhhouggvpehsmhhtphhouhht 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Spam-Score: -6.23 X-Migadu-Queue-Id: 9D3CF538D2 X-Migadu-Spam-Score: -6.23 X-TUID: VCDT2nYceD+Q * gnu/packages/pdf.scm (python-pymupdf): New variable. --- gnu/packages/pdf.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index e270bdf27f..30cc325d48 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -103,6 +103,7 @@ (define-module (gnu packages pdf) #:use-module (gnu packages sdl) #:use-module (gnu packages sphinx) #:use-module (gnu packages sqlite) + #:use-module (gnu packages swig) #:use-module (gnu packages tex) #:use-module (gnu packages time) #:use-module (gnu packages tcl) @@ -906,6 +907,63 @@ (define-public mupdf license:silofl1.1 ;resources/fonts/{han,noto,sil,urw} license:asl2.0)))) ; resources/fonts/droid +(define-public python-pymupdf + (package + (name "python-pymupdf") + (version "1.22.5") + (source + (origin + ;; Not pypi because it download the third_party tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/pymupdf/PyMuPDF") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0n2dvszry5h163x8nn2n33mb2rhjgfjsyllhr02n4fz9madv4rx8")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags #~(list "-k" "not test_color_count") + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'set-build-env + (lambda _ + (let ((include-mupdf + #$(file-append (this-package-input "mupdf") "/include"))) + (substitute* "setup.py" + (("^include_dirs = .*$") + (string-append + "include_dirs = [ \"" include-mupdf "/mupdf\", \"" + #$(file-append + (this-package-input "freetype") "/include/freetype2") + "\"]\n")) + (("^extra_swig_args = .*$") + (string-append + "extra_swig_args = [ \"-I" include-mupdf "\" ]\n")))) + (setenv "CC" "gcc") + (setenv "USE_SYSTEM_LIBS" "yes") + (setenv "PYMUPDF_SETUP_MUPDF_BUILD" "") + (setenv "PYMUPDF_SETUP_MUPDF_THIRD" "0")))))) + (inputs (list mupdf + freetype + gumbo-parser + harfbuzz + jbig2dec + libjpeg-turbo + openjpeg + tesseract-ocr)) + (native-inputs (list gcc + pkg-config + swig + python-pytest + python-fonttools)) + (home-page "https://github.com/pymupdf/PyMuPDF") + (synopsis "Python bindings for the PDF toolkit and renderer MuPDF") + (description "This package provides a Python library for data extraction, +analysis, conversion & manipulation of PDF (and other) documents.") + (license license:agpl3+))) + (define-public qpdf (package (name "qpdf") base-commit: 72745172d155e489936f694d6b9013cb76272370 prerequisite-patch-id: eb618ab7b10483d917c308a38792af98baa517e2 prerequisite-patch-id: 40b6c9f09f27833367a71ec25d77afae4d2a835e prerequisite-patch-id: c12968d02d99c253f858586a86b16fa32d41f1c1 prerequisite-patch-id: 09d995d48139f8e61183d5634cda13a01cdb50f7 prerequisite-patch-id: 86baa45ec2aad977c8c8135f7613aa391155de6d prerequisite-patch-id: 3425fbbff6a603d60b4e143ea2141aabf4ddc92c prerequisite-patch-id: c373c01aab5dcba3503a97d51c62a595147a041c prerequisite-patch-id: cda857c790b88c681c4e713c5f71e40291970daf prerequisite-patch-id: 8e234d0f4d93d2aad499eec8842be3d28da98707 prerequisite-patch-id: 5f664cb2fd995a53765c5ffc19a708ac795cc0c4 prerequisite-patch-id: ed447cba9cf9b7e1a1b47aa27acb14f8f2da0a8e -- 2.41.0