Hello community, here is the log from the commit of package calibre for openSUSE:Factory checked in at 2018-10-01 08:19:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/calibre (Old) and /work/SRC/openSUSE:Factory/.calibre.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "calibre" Mon Oct 1 08:19:53 2018 rev:200 rq:639069 version:3.32.0 Changes: -------- --- /work/SRC/openSUSE:Factory/calibre/calibre.changes 2018-09-11 17:16:38.171471108 +0200 +++ /work/SRC/openSUSE:Factory/.calibre.new/calibre.changes 2018-10-01 08:20:08.677863421 +0200 @@ -1,0 +2,39 @@ +Fri Sep 28 20:28:12 UTC 2018 - [email protected] + +- update to 3.32.0 + New Features + - Edit book: Insert image dialog: Add buttons to change the image + thumbnail size. + - Book details panel: Allow right clicking on a format to open it + in the calibre editor + - Edit metadata dialog: Allow viewing or editing specific formats + by right clicking the format in the formats list + - When creating a metadata jacket allow HTML in custom long text + columns + - Content server: When editing metadata add a button to remove + the existing cover. Note that after removing the cover + a auto-generated cover is displayed instead. You might need to + hit refresh in your browser to see the change. + - Content server: Date edit: Add buttons to clear the date or set + it to today's date + Bug Fixes + - When showing books on the device, disable keyboard shortcuts + for actions that operate on library books + - Content server: Custom List: Fix a zero series index being + displayed as one + - Content server: Fix covers not being updated in downloaded + copies of some books. + - PDF Output: Fix an error that could occur in rare circumstances + when using the option to read page margins from the input + document + - Edit book: Check book: Fix an error if a filename contains + a % character + - PDF Output: Fix CSS opacity property causing text to not be + rendered. Now opacity is ignored, as it is unsupported by + Qt WebKit. + - Create custom column dialog: Ensure that the format numbers + field is always visible +- Add calibre-UnicodeEncodeError-build.patch + to fix UnicodeEncodeError build error + +------------------------------------------------------------------- Old: ---- calibre-3.31.0.tar.xz calibre-3.31.0.tar.xz.sig New: ---- calibre-3.32.0.tar.xz calibre-3.32.0.tar.xz.sig calibre-UnicodeEncodeError-build.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ calibre.spec ++++++ --- /var/tmp/diff_new_pack.PYWea4/_old 2018-10-01 08:20:10.237862427 +0200 +++ /var/tmp/diff_new_pack.PYWea4/_new 2018-10-01 08:20:10.273862405 +0200 @@ -17,7 +17,7 @@ Name: calibre -Version: 3.31.0 +Version: 3.32.0 Release: 0 Summary: EBook Management Application License: GPL-3.0-only @@ -28,6 +28,9 @@ Source2: https://calibre-ebook.com/signatures/kovid.gpg#/%{name}.keyring Source3: %{name}.desktop Source100: %{name}-rpmlintrc +# PATCH-FIX-UPSTREAM: fix build error - UnicodeEncodeError +Patch1: %{name}-UnicodeEncodeError-build.patch +# Patch2: %{name}-setup.install.py.diff # PATCH-FIX-OPENSUSE: disabling Autoupdate Searcher Patch3: %{name}-no-update.diff @@ -63,8 +66,7 @@ BuildRequires: podofo >= 0.8.2 BuildRequires: poppler-tools >= 0.20.2 BuildRequires: python >= 2.7.9 -# upstream use for PIL: BuildRequires: python-imaging >= 1.1.6 -BuildRequires: python-Pillow +BuildRequires: python-Pillow >= 3.2.0 BuildRequires: python-Pygments >= 2.1.3 BuildRequires: python-apsw >= 3.7.17 # upstream use python-chardet 3.0.3 @@ -75,12 +77,11 @@ # upstream use python-dnspython 0.14.0 BuildRequires: python-dnspython >= 1.12.0 BuildRequires: python-dukpy-kovidgoyal -BuildRequires: python-html5-parser +BuildRequires: python-html5-parser >= 0.4.3 BuildRequires: python-html5lib BuildRequires: python-lxml >= 3.8.0 BuildRequires: python-mechanize >= 0.1.11 -# upstream use python-msgpack-python 0.4.8 -BuildRequires: python-msgpack-python >= 0.4.6 +BuildRequires: python-msgpack-python >= 0.5.6 BuildRequires: python-netifaces BuildRequires: python-odfpy BuildRequires: python-psutil >= 0.6.1 @@ -104,7 +105,7 @@ Requires: podofo >= 0.8.2 Requires: poppler-tools >= 0.20.2 Requires: python >= 2.7.9 -Requires: python-Pillow +Requires: python-Pillow >= 3.2.0 Requires: python-Pygments >= 2.1.3 Requires: python-apsw >= 3.7.17 Requires: python-chardet @@ -112,11 +113,11 @@ Requires: python-dateutil >= 1.4.1 Requires: python-dnspython >= 1.12.0 Requires: python-dukpy-kovidgoyal -Requires: python-html5-parser +Requires: python-html5-parser >= 0.4.3 Requires: python-html5lib Requires: python-lxml >= 3.8.0 Requires: python-mechanize >= 0.1.11 -Requires: python-msgpack-python >= 0.4.6 +Requires: python-msgpack-python >= 0.5.6 Requires: python-netifaces >= 0.8 Requires: python-odfpy Requires: python-psutil >= 0.6.1 @@ -145,6 +146,7 @@ %prep %setup -q +%patch1 -p1 %patch2 -p1 %patch3 -p1 -b .no-update ++++++ calibre-3.31.0.tar.xz -> calibre-3.32.0.tar.xz ++++++ /work/SRC/openSUSE:Factory/calibre/calibre-3.31.0.tar.xz /work/SRC/openSUSE:Factory/.calibre.new/calibre-3.32.0.tar.xz differ: char 25, line 1 ++++++ calibre-UnicodeEncodeError-build.patch ++++++ >From 01a9fb66871abb485ac9b3a69ea7b7086d2ce51a Mon Sep 17 00:00:00 2001 From: Kovid Goyal <[email protected]> Date: Fri, 28 Sep 2018 09:47:35 +0530 Subject: [PATCH] Fix #1794915 [setup.py build does not work due to UnicodeEncodeError](https://bugs.launchpad.net/calibre/+bug/1794915) --- setup/__init__.py | 67 +++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 32 deletions(-) Index: calibre-3.32.0/setup/__init__.py =================================================================== --- calibre-3.32.0.orig/setup/__init__.py +++ calibre-3.32.0/setup/__init__.py @@ -10,6 +10,7 @@ import sys, re, os, platform, subprocess is64bit = platform.architecture()[0] == '64bit' iswindows = re.search('win(32|64)', sys.platform) +ispy3 = sys.version_info.major > 2 isosx = 'darwin' in sys.platform isfreebsd = 'freebsd' in sys.platform isnetbsd = 'netbsd' in sys.platform @@ -121,6 +122,49 @@ initialize_constants() preferred_encoding = 'utf-8' + +if ispy3: + prints = print +else: + def prints(*args, **kwargs): + ''' + Print unicode arguments safely by encoding them to preferred_encoding + Has the same signature as the print function from Python 3, except for the + additional keyword argument safe_encode, which if set to True will cause the + function to use repr when encoding fails. + ''' + file = kwargs.get('file', sys.stdout) + sep = kwargs.get('sep', ' ') + end = kwargs.get('end', '\n') + enc = preferred_encoding + safe_encode = kwargs.get('safe_encode', False) + for i, arg in enumerate(args): + if isinstance(arg, unicode): + try: + arg = arg.encode(enc) + except UnicodeEncodeError: + if not safe_encode: + raise + arg = repr(arg) + if not isinstance(arg, str): + try: + arg = str(arg) + except ValueError: + arg = unicode(arg) + if isinstance(arg, unicode): + try: + arg = arg.encode(enc) + except UnicodeEncodeError: + if not safe_encode: + raise + arg = repr(arg) + + file.write(arg) + if i != len(args)-1: + file.write(sep) + file.write(end) + + warnings = [] @@ -227,12 +271,12 @@ class Command(object): return newer(targets, sources) def info(self, *args, **kwargs): - print(*args, **kwargs) + prints(*args, **kwargs) sys.stdout.flush() def warn(self, *args, **kwargs): print('\n'+'_'*20, 'WARNING','_'*20) - print(*args, **kwargs) + prints(*args, **kwargs) print('_'*50) warnings.append((args, kwargs)) sys.stdout.flush()
