summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTanguy Le Carrour <tanguy@bioneland.org>2022-01-13 10:50:33 +0100
committerLeo Famulari <leo@famulari.name>2022-01-13 14:03:04 -0500
commit66ab299a076b27854a5e4be5c0960ad306682e76 (patch)
treea45b82012c5f329d0daef91ce80b9c7a466500ea /gnu
parent175915bb4417e198f6b500901dcef710a0011be9 (diff)
downloadguix-patches-66ab299a076b27854a5e4be5c0960ad306682e76.tar
guix-patches-66ab299a076b27854a5e4be5c0960ad306682e76.tar.gz
Revert "gnu: Remove python-msgpack-transitional."
This reverts commit d5ae6739fdb4786c49d33de3fec9872c73d2e311. It turned out that 'poetry' requires this transitional msgpack package: https://issues.guix.gnu.org/53228 Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python-xyz.scm34
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e53ba67cdc..66ec26d142 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10923,6 +10923,40 @@ reading and writing MessagePack data.")
(home-page "https://pypi.org/project/msgpack/")
(license license:asl2.0)))
+;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
+;; release 0.5. Some packages like borg still call it by the old name for now.
+;; <https://bugs.gnu.org/30662>
+(define-public python-msgpack-transitional
+ (package
+ (inherit python-msgpack)
+ (name "python-msgpack-transitional")
+ (version "0.5.6")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "msgpack" version))
+ (sha256
+ (base32
+ "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-msgpack)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'configure-transitional
+ (lambda _
+ ;; Keep using the old name.
+ (substitute* "setup.py"
+ (("TRANSITIONAL = False")
+ "TRANSITIONAL = 1"))
+ ;; This old version is not compatible with Python 3.9
+ (substitute* '("test/test_buffer.py" "test/test_extension.py")
+ ((".tostring\\(") ".tobytes("))
+ (substitute* '("test/test_buffer.py" "test/test_extension.py")
+ ((".fromstring\\(") ".frombytes("))
+ #t))))))))
+
+(define-public python2-msgpack
+ (package-with-python2 python-msgpack))
+
(define-public python-netaddr
(package
(name "python-netaddr")