mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu: calibre: Fix build with python-msgpack >= 1.0.
* gnu/packages/patches/calibre-msgpack-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/ebook.scm (calibre)[source](patches): Add it.
This commit is contained in:
parent
f3697439cd
commit
3e4ce1cc3e
3 changed files with 20 additions and 0 deletions
|
@ -776,6 +776,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/blender-2.79-python-3.7-fix.patch \
|
%D%/packages/patches/blender-2.79-python-3.7-fix.patch \
|
||||||
%D%/packages/patches/bluez-CVE-2020-0556.patch \
|
%D%/packages/patches/bluez-CVE-2020-0556.patch \
|
||||||
%D%/packages/patches/byobu-writable-status.patch \
|
%D%/packages/patches/byobu-writable-status.patch \
|
||||||
|
%D%/packages/patches/calibre-msgpack-compat.patch \
|
||||||
%D%/packages/patches/calibre-no-updates-dialog.patch \
|
%D%/packages/patches/calibre-no-updates-dialog.patch \
|
||||||
%D%/packages/patches/calibre-remove-test-bs4.patch \
|
%D%/packages/patches/calibre-remove-test-bs4.patch \
|
||||||
%D%/packages/patches/calibre-remove-test-sqlite.patch \
|
%D%/packages/patches/calibre-remove-test-sqlite.patch \
|
||||||
|
|
|
@ -104,6 +104,7 @@ (define-public calibre
|
||||||
(delete-file "resources/calibre-portable.sh")
|
(delete-file "resources/calibre-portable.sh")
|
||||||
#t))
|
#t))
|
||||||
(patches (search-patches "calibre-no-updates-dialog.patch"
|
(patches (search-patches "calibre-no-updates-dialog.patch"
|
||||||
|
"calibre-msgpack-compat.patch"
|
||||||
"calibre-remove-test-bs4.patch" ; TODO: fix test.
|
"calibre-remove-test-bs4.patch" ; TODO: fix test.
|
||||||
"calibre-remove-test-sqlite.patch" ; TODO: fix test.
|
"calibre-remove-test-sqlite.patch" ; TODO: fix test.
|
||||||
"calibre-remove-test-unrar.patch"))))
|
"calibre-remove-test-unrar.patch"))))
|
||||||
|
|
18
gnu/packages/patches/calibre-msgpack-compat.patch
Normal file
18
gnu/packages/patches/calibre-msgpack-compat.patch
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
Fix deserialization with msgpack 1.0.
|
||||||
|
|
||||||
|
Patch copied from upstream source repository:
|
||||||
|
https://github.com/kovidgoyal/calibre/commit/0ff41ac64994ec11b7859fc004c94d08769e3af3
|
||||||
|
|
||||||
|
diff --git a/src/calibre/utils/serialize.py b/src/calibre/utils/serialize.py
|
||||||
|
index f5d560c468..c35ae53849 100644
|
||||||
|
--- a/src/calibre/utils/serialize.py
|
||||||
|
+++ b/src/calibre/utils/serialize.py
|
||||||
|
@@ -110,7 +110,7 @@ def msgpack_decoder(code, data):
|
||||||
|
def msgpack_loads(dump, use_list=True):
|
||||||
|
# use_list controls whether msgpack arrays are unpacked as lists or tuples
|
||||||
|
import msgpack
|
||||||
|
- return msgpack.unpackb(dump, ext_hook=msgpack_decoder, raw=False, use_list=use_list)
|
||||||
|
+ return msgpack.unpackb(dump, ext_hook=msgpack_decoder, raw=False, use_list=use_list, strict_map_key=False)
|
||||||
|
|
||||||
|
|
||||||
|
def json_loads(data):
|
Loading…
Reference in a new issue