GNU bug report logs -
#67970
[PATCH v2] gnu: python-pdfminer-six: Update to 20231228.
Previous Next
Reported by: Felix Gruber <felgru <at> posteo.net>
Date: Fri, 22 Dec 2023 17:51:02 UTC
Severity: normal
Tags: patch
Done: Andreas Enge <andreas <at> enge.fr>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67970 in the body.
You can then email your comments to 67970 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, jgart <at> dismail.de, guix-patches <at> gnu.org
:
bug#67970
; Package
guix-patches
.
(Fri, 22 Dec 2023 17:51:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Felix Gruber <felgru <at> posteo.net>
:
New bug report received and forwarded. Copy sent to
lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, jgart <at> dismail.de, guix-patches <at> gnu.org
.
(Fri, 22 Dec 2023 17:51:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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
Information forwarded
to
lars <at> 6xq.net, marius <at> gnu.org, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, tanguy <at> bioneland.org, jgart <at> dismail.de, guix-patches <at> gnu.org
:
bug#67970
; Package
guix-patches
.
(Sun, 09 Jun 2024 09:45:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 67970 <at> debbugs.gnu.org (full text, mbox):
* 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
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 <at> posteo.net>
to
control <at> debbugs.gnu.org
.
(Sun, 09 Jun 2024 17:26:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Andreas Enge <andreas <at> enge.fr>
:
You have taken responsibility.
(Sun, 07 Jul 2024 10:12:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Felix Gruber <felgru <at> posteo.net>
:
bug acknowledged by developer.
(Sun, 07 Jul 2024 10:12:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 67970-done <at> debbugs.gnu.org (full text, mbox):
Applied, thanks!
The linter says there is a new version, 20240706.
If you feel like updating again, please open a new issue.
Andreas
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 04 Aug 2024 11:24:15 GMT)
Full text and
rfc822 format available.
This bug report was last modified 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.