GNU bug report logs - #67970
[PATCH v2] gnu: python-pdfminer-six: Update to 20231228.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Felix Gruber <felgru@HIDDEN>; Keywords: patch; dated Fri, 22 Dec 2023 17:51:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.
Changed bug title to '[PATCH v2] gnu: python-pdfminer-six: Update to 20231228.' from '[PATCH] gnu: python-pdfminer-six: Update to 20221105.' Request was from Felix Gruber <felgru@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 67970 <at> debbugs.gnu.org:


Received: (at 67970) by debbugs.gnu.org; 9 Jun 2024 09:44:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 09 05:44:13 2024
Received: from localhost ([127.0.0.1]:55715 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sGF5x-0005ZD-2u
	for submit <at> debbugs.gnu.org; Sun, 09 Jun 2024 05:44:13 -0400
Received: from mout02.posteo.de ([185.67.36.66]:60775)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <felgru@HIDDEN>) id 1sGF5u-0005Yj-RO
 for 67970 <at> debbugs.gnu.org; Sun, 09 Jun 2024 05:44:11 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 43D08240101
 for <67970 <at> debbugs.gnu.org>; Sun,  9 Jun 2024 11:35:37 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1717925737; bh=F56lYNKS/7KZu1hf+8HqcBEQACHltHsFINgdpDbfm1c=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:
 Content-Transfer-Encoding:From;
 b=GWaNS5edkVL+CsHDmeOreJaNXyzJ0j9rfgTTxivm+KmybxhCxNsFMW/p/Ds3yyDUV
 cCwIAUcCVG+sh7v8oEv5VXZzvfA/I7R5Jmp0BnbM9E5p7i5IMh2Ye/PmO6L5qmbrS+
 k0amQq1wi0+3+lcmNv2ZcdKUenVIl/j98aVsqRGqbL2SB3TZqND0nvX38IlyJUxOcS
 HQGO6m1cm1XnWfLUTh0IipkskMkFXp5yvmQH6pWBz0IlhNwRiymxlN/71mXNlkWROJ
 +rJfHl/g88dMg+7ebkC/RE/kNupOTR4K+fxj2ZfpjV0vpzBIWl890byK3k+LEN/gEn
 HXOTVXHxIkyTg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VxqYN5f99z6twD;
 Sun,  9 Jun 2024 11:35:36 +0200 (CEST)
From: Felix Gruber <felgru@HIDDEN>
To: 67970 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: python-pdfminer-six: Update to 20231228.
Date: Sun,  9 Jun 2024 09:35:07 +0000
Message-ID: <4f503089d8d97215efe632e3048934b6278477d7.1717925707.git.felgru@HIDDEN>
In-Reply-To: <00adf56591326b3694c391c78f6a9613f9e78ba2.1703267366.git.felgru@HIDDEN>
References: <00adf56591326b3694c391c78f6a9613f9e78ba2.1703267366.git.felgru@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Lars-Dominik Braun <lars@HIDDEN>, Marius Bakke <marius@HIDDEN>,
 Munyoki Kilyungi <me@HIDDEN>,
 Sharlatan Hellseher <sharlatanus@HIDDEN>,
 Tanguy Le Carrour <tanguy@HIDDEN>, jgart <jgart@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 67970
Cc: Felix Gruber <felgru@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/packages/python-xyz.scm (python-pdfminer-six): Update to 20231228.
  [build-system]: Use pyproject-build-system.
  [arguments]: Convert to gexp and remove custom 'check phase.
  [propagated-inputs]: Remove python-chardet and python-sortedcontainers;
  add python-charset-normalizer.
  [native-inputs]: Remove python-nose and python-tox; add python-pytest.

Change-Id: I9913385a681b32afde930e32e7379db91357177b
---
 gnu/packages/python-xyz.scm | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c22df7728a..b34caef16a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19926,7 +19926,7 @@ (define-public python-jellyfish
 (define-public python-pdfminer-six
   (package
     (name "python-pdfminer-six")
-    (version "20201018")
+    (version "20231228")
     ;; There are no tests in the PyPI tarball.
     (source
      (origin
@@ -19936,23 +19936,19 @@ (define-public python-pdfminer-six
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
-    (build-system python-build-system)
+        (base32 "1anyr0gm7amwls8qifflql1viz5rq6q95lfwcg43v3180h4w8wrd"))))
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ;; Tests write to the source tree.
-         (add-after 'unpack 'make-git-checkout-writable
-           (lambda _
-             (for-each make-file-writable (find-files "."))
-             #t))
-         (replace 'check
-           (lambda _
-             (invoke "make" "test"))))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               ;; Tests write to the source tree.
+               (add-after 'unpack 'make-git-checkout-writable
+                 (lambda _
+                   (for-each make-file-writable (find-files ".")))))))
     (propagated-inputs
-     (list python-chardet python-cryptography python-sortedcontainers))
+     (list python-charset-normalizer python-cryptography))
     (native-inputs
-     (list python-nose python-tox))
+     (list python-pytest))
     (home-page "https://github.com/pdfminer/pdfminer.six")
     (synopsis "PDF parser and analyzer")
     (description "@code{pdfminer.six} is a community maintained fork of

base-commit: bc8a41f4a8d9f1f0525d7bc97c67ed3c8aea3111
-- 
2.43.0





Information forwarded to lars@HIDDEN, marius@HIDDEN, me@HIDDEN, sharlatanus@HIDDEN, tanguy@HIDDEN, jgart@HIDDEN, guix-patches@HIDDEN:
bug#67970; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Dec 2023 17:50:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 22 12:50:04 2023
Received: from localhost ([127.0.0.1]:47840 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rGjet-0006Ve-EN
	for submit <at> debbugs.gnu.org; Fri, 22 Dec 2023 12:50:04 -0500
Received: from lists.gnu.org ([2001:470:142::17]:33940)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <felgru@HIDDEN>) id 1rGjep-0006V2-9X
 for submit <at> debbugs.gnu.org; Fri, 22 Dec 2023 12:50:01 -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 <felgru@HIDDEN>) id 1rGjee-00009z-W7
 for guix-patches@HIDDEN; Fri, 22 Dec 2023 12:49:49 -0500
Received: from mout01.posteo.de ([185.67.36.65])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <felgru@HIDDEN>) id 1rGjec-0006XC-BU
 for guix-patches@HIDDEN; Fri, 22 Dec 2023 12:49:48 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 5EA09240027
 for <guix-patches@HIDDEN>; Fri, 22 Dec 2023 18:49:42 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1703267382; bh=wzlGYC+uak40H7q8qGOud73880xV+lDlgfRA8YcJ+hg=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:
 Content-Transfer-Encoding:From;
 b=ffC5xKjPI2YWfc65SVqh4lKwbwAqnMx2t/OSJobF95KUwIySHBPYzZ8+07BKpOgft
 wNEkELZhY4KpV1JujWWe0giu3mMP/tlyHqL8ATiYZOSh0aEZ4Xlm+BV2e+GBvxv4EU
 8Qxk+Y9Rp4EeCeCIodyR6+LdugFfeECn7TFZA3c6fp8WhGBLwcf0OfhdqZwqMBrpEZ
 tqJjDFS8/3aQzohjHZbVU910R0ZRVdea6le73vj3qB8AJcNZr+sPLO6ODU3UyFolT+
 VlzNo9urv12y+U/gYys4gBSdlZB0KVR1CVklXWsiRA28fuwkk53Sp8hQ3odVvl2TVo
 dWZC6APseDVBA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4SxZYw53v3z6tvp;
 Fri, 22 Dec 2023 18:49:40 +0100 (CET)
From: Felix Gruber <felgru@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: python-pdfminer-six: Update to 20221105.
Date: Fri, 22 Dec 2023 17:49:26 +0000
Message-ID: <00adf56591326b3694c391c78f6a9613f9e78ba2.1703267366.git.felgru@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Lars-Dominik Braun <lars@HIDDEN>, Marius Bakke <marius@HIDDEN>,
 Munyoki Kilyungi <me@HIDDEN>, jgart <jgart@HIDDEN>
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=185.67.36.65; envelope-from=felgru@HIDDEN;
 helo=mout01.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 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-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: Felix Gruber <felgru@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

* gnu/packages/python-xyz.scm (python-pdfminer-six): Update to 20221105.
  [build-system]: Use pyproject-build-system.
  [arguments]: Convert to gexp, remove custom 'check phase and add new
  phase to fix version.
  [propagated-inputs]: Remove python-chardet and python-sortedcontainers;
  add python-charset-normalizer.
  [native-inputs]: Remove python-nose and python-tox; add python-pytest.
* gnu/packages/patches/python-pdfminer-six-fix-imports-in-tests.patch:
  New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Change-Id: I9913385a681b32afde930e32e7379db91357177b
---
 gnu/local.mk                                  |  1 +
 ...on-pdfminer-six-fix-imports-in-tests.patch | 41 +++++++++++++++++++
 gnu/packages/python-xyz.scm                   | 33 ++++++++-------
 3 files changed, 60 insertions(+), 15 deletions(-)
 create mode 100644 gnu/packages/patches/python-pdfminer-six-fix-imports-in-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index caf2bb16fa..6e56c5ed38 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1773,6 +1773,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-feedparser-missing-import.patch	\
   %D%/packages/patches/python-louvain-fix-test.patch		\
   %D%/packages/patches/python-random2-getrandbits-test.patch		\
+  %D%/packages/patches/python-pdfminer-six-fix-imports-in-tests.patch	\
   %D%/packages/patches/python-poppler-qt5-fix-build.patch	\
   %D%/packages/patches/python-pypdf-annotate-tests-appropriately.patch	\
   %D%/packages/patches/python-sip-include-dirs.patch	\
diff --git a/gnu/packages/patches/python-pdfminer-six-fix-imports-in-tests.patch b/gnu/packages/patches/python-pdfminer-six-fix-imports-in-tests.patch
new file mode 100644
index 0000000000..13c793811a
--- /dev/null
+++ b/gnu/packages/patches/python-pdfminer-six-fix-imports-in-tests.patch
@@ -0,0 +1,41 @@
+Fix import errors during tests.
+
+See https://github.com/pdfminer/pdfminer.six/issues/896
+
+This patch has been taken from
+https://build.opensuse.org/package/view_file/openSUSE:Factory/python-pdfminer.six/import-from-non-pythonpath-files.patch
+
+diff '--color=auto' -rub pdfminer.six-20221105.orig/tests/test_tools_dumppdf.py pdfminer.six-20221105/tests/test_tools_dumppdf.py
+--- pdfminer.six-20221105.orig/tests/test_tools_dumppdf.py	2022-11-05 12:22:08.000000000 -0400
++++ pdfminer.six-20221105/tests/test_tools_dumppdf.py	2023-12-11 12:12:06.044210731 -0500
+@@ -4,7 +4,11 @@
+ 
+ from helpers import absolute_sample_path
+ from tempfilepath import TemporaryFilePath
+-from tools import dumppdf
++ 
++import importlib.util
++spec = importlib.util.spec_from_file_location("dumppdf", "tools/dumppdf.py")
++dumppdf = importlib.util.module_from_spec(spec)
++spec.loader.exec_module(dumppdf)
+ 
+ 
+ def run(filename, options=None):
+diff '--color=auto' -rub pdfminer.six-20221105.orig/tests/test_tools_pdf2txt.py pdfminer.six-20221105/tests/test_tools_pdf2txt.py
+--- pdfminer.six-20221105.orig/tests/test_tools_pdf2txt.py	2022-11-05 12:22:08.000000000 -0400
++++ pdfminer.six-20221105/tests/test_tools_pdf2txt.py	2023-12-11 12:12:40.848031179 -0500
+@@ -3,10 +3,13 @@
+ from tempfile import mkdtemp
+ import filecmp
+ 
+-import tools.pdf2txt as pdf2txt
+ from helpers import absolute_sample_path
+ from tempfilepath import TemporaryFilePath
+ 
++import importlib.util
++spec = importlib.util.spec_from_file_location("pdf2txt", "tools/pdf2txt.py")
++pdf2txt = importlib.util.module_from_spec(spec)
++spec.loader.exec_module(pdf2txt)
+ 
+ def run(sample_path, options=None):
+     absolute_path = absolute_sample_path(sample_path)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 404177e9cd..18019cc859 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18188,7 +18188,7 @@ (define-public python-jellyfish
 (define-public python-pdfminer-six
   (package
     (name "python-pdfminer-six")
-    (version "20201018")
+    (version "20221105")
     ;; There are no tests in the PyPI tarball.
     (source
      (origin
@@ -18198,23 +18198,26 @@ (define-public python-pdfminer-six
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
-    (build-system python-build-system)
+        (base32 "06gqlpv7vakd3nr20mf2x161z9a9bbvxnvf424i3wzlq3d01w89v"))
+       (patches
+         (search-patches "python-pdfminer-six-fix-imports-in-tests.patch"))))
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ;; Tests write to the source tree.
-         (add-after 'unpack 'make-git-checkout-writable
-           (lambda _
-             (for-each make-file-writable (find-files "."))
-             #t))
-         (replace 'check
-           (lambda _
-             (invoke "make" "test"))))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               ;; Tests write to the source tree.
+               (add-after 'unpack 'make-git-checkout-writable
+                 (lambda _
+                   (for-each make-file-writable (find-files "."))))
+               (add-after 'make-git-checkout-writable 'patch
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (substitute* "pdfminer/__init__.py"
+                     ;; Replace version placeholder with actual version.
+                     (("__VERSION__") #$(package-version this-package))))))))
     (propagated-inputs
-     (list python-chardet python-cryptography python-sortedcontainers))
+     (list python-charset-normalizer python-cryptography))
     (native-inputs
-     (list python-nose python-tox))
+     (list python-pytest))
     (home-page "https://github.com/pdfminer/pdfminer.six")
     (synopsis "PDF parser and analyzer")
     (description "@code{pdfminer.six} is a community maintained fork of

base-commit: ca813173894360edef35a5d98878a3135e99e62a
-- 
2.43.0





Acknowledgement sent to Felix Gruber <felgru@HIDDEN>:
New bug report received and forwarded. Copy sent to lars@HIDDEN, marius@HIDDEN, me@HIDDEN, jgart@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to lars@HIDDEN, marius@HIDDEN, me@HIDDEN, jgart@HIDDEN, guix-patches@HIDDEN:
bug#67970; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 9 Jun 2024 17:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.