guix_mirror_bot pushed a commit to branch python-team
in repository guix.
commit e51e46f9b62f4500ec7ad4a09ea9d2028095e387
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Sun Dec 7 10:47:14 2025 +0000
gnu: python-xmp-toolkit: Update to 2.1.0.
* gnu/packages/python-xyz.scm (python-xmp-toolkit): Update to 2.1.0.
[source]: Remove patch as applied upstream.
[arguments] <test-flags>: Run all tests.
<phases>: Remove 'configure-environment; add 'patch-source.
[native-inputs]: Remove python-setuptools and python-wheel; add
python-flit-core.
* gnu/packages/patches/python-xmp-toolkit-add-missing-error-codes.patch:
Delete file.
* gnu/local.mk (dist_patch_DATA): Deregister patch.
Change-Id: I3443ecd6ad2bd423544d06d1e6e0de7079ed6296
---
gnu/local.mk | 1 -
...ython-xmp-toolkit-add-missing-error-codes.patch | 51 ----------------------
gnu/packages/python-xyz.scm | 35 +++++++--------
3 files changed, 16 insertions(+), 71 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 62c4e87e7c..ecfffcc778 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2200,7 +2200,6 @@ dist_patch_DATA =
\
%D%/packages/patches/python-vega-datasets-remove-la-riots-code.patch \
%D%/packages/patches/python-versioneer-guix-support.patch \
%D%/packages/patches/python-werkzeug-tests.patch \
- %D%/packages/patches/python-xmp-toolkit-add-missing-error-codes.patch
\
%D%/packages/patches/qdigidoc-bundle-config-files.patch \
%D%/packages/patches/qdigidoc-bundle-tsl-files.patch \
%D%/packages/patches/qemu-build-info-manual.patch \
diff --git
a/gnu/packages/patches/python-xmp-toolkit-add-missing-error-codes.patch
b/gnu/packages/patches/python-xmp-toolkit-add-missing-error-codes.patch
deleted file mode 100644
index 17bdae188f..0000000000
--- a/gnu/packages/patches/python-xmp-toolkit-add-missing-error-codes.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From fd9e887a1853d9b4bc3fce20d414d648fb5abbfc Mon Sep 17 00:00:00 2001
-From: Asher Glick <[email protected]>
-Date: Mon, 1 Mar 2021 14:35:46 -0600
-Subject: [PATCH] Add missing error codes and graceful handling of possible
- future missing codes.
-
----
- libxmp/exempi.py | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/libxmp/exempi.py b/libxmp/exempi.py
-index 683e240..f58003c 100644
---- a/libxmp/exempi.py
-+++ b/libxmp/exempi.py
-@@ -85,6 +85,7 @@ ERROR_MESSAGE = { 0: "unknown error",
- -13: "std exception",
- -14: "unknown exception",
- -15: "no memory",
-+ -16: "progress abort",
- -101: "bad schema",
- -102: "bad XPath",
- -103: "bad options",
-@@ -95,6 +96,14 @@ ERROR_MESSAGE = { 0: "unknown error",
- -108: "bad file format",
- -109: "no file handler",
- -110: "too large for JPEG",
-+ -111: "no file",
-+ -112: "file permission error",
-+ -113: "disk space",
-+ -114: "read error",
-+ -115: "write error",
-+ -116: "bad block format",
-+ -117: "file path not a file",
-+ -118: "rejected file extension",
- -201: "bad XML",
- -202: "bad RDF",
- -203: "bad XMP",
-@@ -1697,6 +1706,9 @@ def check_error(success):
- # so we supplement it by explicitly checking the error code.
- ecode = EXEMPI.xmp_get_error()
- if not success or ecode != 0:
-- error_msg = ERROR_MESSAGE[ecode]
-+ if ecode in ERROR_MESSAGE:
-+ error_msg = ERROR_MESSAGE[ecode]
-+ else:
-+ error_msg = "Unexpected error code " + str(ecode)
- msg = 'Exempi function failure ("{0}").'.format(error_msg)
- raise XMPError(msg)
---
-2.30.2
-
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 967814d1ab..77520acdcd 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -41301,34 +41301,31 @@ Library.")
(define-public python-xmp-toolkit
(package
(name "python-xmp-toolkit")
- (version "2.0.2")
+ (version "2.1.0")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "python-xmp-toolkit" version))
+ (uri (pypi-uri "python_xmp_toolkit" version))
(sha256
- (base32 "12x6lyaxjpbl8ll3cj97039kwvsha2nkx2v8v8irfbi2p0dl721s"))
- (patches (search-patches
- "python-xmp-toolkit-add-missing-error-codes.patch"))))
+ (base32 "1np2njq6c1fnxh6bbh3xp2slz5dm7aamknv7hxax53a11p3a42na"))))
(build-system pyproject-build-system)
(arguments
(list
- #:test-flags
- #~(list "-k" (string-append "not test_can_put_xmp and "
- "not test_exempi_bad_combinations and "
- "not test_formats and "
- "not test_get_xmp and "
- "not test_open_file_with_options"))
#:phases
#~(modify-phases %standard-phases
- (add-before 'build 'configure-environment
- (lambda* (#:key outputs inputs #:allow-other-keys)
- (let ((exempi #$(this-package-input "exempi")))
- (setenv "LD_LIBRARY_PATH"
- (string-append exempi "/lib"))))))))
- (inputs (list exempi))
- (propagated-inputs (list python-pytz))
- (native-inputs (list python-pytest python-setuptools python-wheel))
+ (add-after 'unpack 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "libxmp/exempi.py"
+ (("ctypes.util.find_library\\('exempi'\\)")
+ (format #f "~s" (search-input-file
+ inputs "lib/libexempi.so")))))))))
+ (native-inputs
+ (list python-pytest
+ python-flit-core))
+ (inputs
+ (list exempi))
+ (propagated-inputs
+ (list python-pytz))
(home-page "https://github.com/python-xmp-toolkit/python-xmp-toolkit")
(synopsis "Python XMP Toolkit for working with metadata")
(description "Python XMP Toolkit is a library for working with XMP