diff --git a/.gitignore b/.gitignore index 8948bf4..9e5833c 100644 --- a/.gitignore +++ b/.gitignore @@ -307,3 +307,4 @@ calibre-0.7.14-nofonts.tar.xz /calibre-4.17.0.tar.xz /calibre-4.18.0.tar.xz /test +/calibre-4.19.0.tar.xz diff --git a/calibre-plistlib.patch b/calibre-plistlib.patch new file mode 100644 index 0000000..109c0d5 --- /dev/null +++ b/calibre-plistlib.patch @@ -0,0 +1,47 @@ +diff -Nur calibre-4.19.0.orig/src/calibre/utils/config.py calibre-4.19.0/src/calibre/utils/config.py +--- calibre-4.19.0.orig/src/calibre/utils/config.py 2020-07-01 17:51:39.590637064 -0700 ++++ calibre-4.19.0/src/calibre/utils/config.py 2020-07-01 17:50:51.287601015 -0700 +@@ -363,29 +363,26 @@ + self.update(d) + + def __getitem__(self, key): +- from polyglot.plistlib import Data + try: + ans = dict.__getitem__(self, key) +- if isinstance(ans, Data): ++ if isinstance(ans, bytes): + ans = ans.data + return ans + except KeyError: + return self.defaults.get(key, None) + + def get(self, key, default=None): +- from polyglot.plistlib import Data + try: + ans = dict.__getitem__(self, key) +- if isinstance(ans, Data): ++ if isinstance(ans, bytes): + ans = ans.data + return ans + except KeyError: + return self.defaults.get(key, default) + + def __setitem__(self, key, val): +- from polyglot.plistlib import Data + if isinstance(val, bytes): +- val = Data(val) ++ val = bytes(val) + dict.__setitem__(self, key, val) + self.commit() + +diff -Nur calibre-4.19.0.orig/src/polyglot/plistlib.py calibre-4.19.0/src/polyglot/plistlib.py +--- calibre-4.19.0.orig/src/polyglot/plistlib.py 2020-07-01 17:51:39.601637072 -0700 ++++ calibre-4.19.0/src/polyglot/plistlib.py 2020-07-01 17:51:23.458625025 -0700 +@@ -6,6 +6,6 @@ + from polyglot.builtins import is_py3 + + if is_py3: +- from plistlib import loads, dumps, Data # noqa ++ from plistlib import loads, dumps # noqa + else: + from plistlib import readPlistFromString as loads, writePlistToString as dumps, Data # noqa diff --git a/calibre.spec b/calibre.spec index 3c1af5a..bf71e4a 100644 --- a/calibre.spec +++ b/calibre.spec @@ -5,7 +5,7 @@ %global _python_bytecompile_extra 0 Name: calibre -Version: 4.18.0 +Version: 4.19.0 Release: 1%{?dist} Summary: E-book converter and library manager License: GPLv3 @@ -16,6 +16,10 @@ Source0: https://download.calibre-ebook.com/%{version}/%{name}-%{version} # Disable auto update from inside the app Patch1: calibre-no-update.patch +# plistlib.Data is dropped in python 3.9, so remove it's use +# https://github.com/kovidgoyal/calibre/pull/1184 +Patch2: calibre-plistlib.patch + # Do not display multiple apps in desktop files, only the main app # This is so gnome-software only 'sees' calibre once. Patch3: calibre-nodisplay.patch @@ -341,6 +345,10 @@ ln -s -r %{_datadir}/calibre/mathjax-fedora %{_datadir}/calibre/mathjax %{_datadir}/metainfo/*.appdata.xml %changelog +* Wed Jul 01 2020 Kevin Fenzi - 4.19.0-1 +- Update to 4.19.0 +- Add patch for plistlib change + * Mon Jun 08 2020 Kevin Fenzi - 4.18.0-1 - Update to 4.18.0. diff --git a/sources b/sources index ccc51e5..0320f20 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (calibre-4.18.0.tar.xz) = cc75e8b78722eb286af57f1d6b1ed783647f69471d903a3d4dd458b3f6966804e8e4fda7bd1947e9107ce9a280486ea7de101f7b843f8365bfe6e874d9ebf3d3 +SHA512 (calibre-4.19.0.tar.xz) = 47b767b3f23f01fa1931abd470eb69f5493f5b0e6cd5c0e566b5576d1d831137c28555de3f73ad2a2dd0dd03615171a4c62356278a590ad48b77a6ca1cac890b