diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-08-16 14:07:04 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-08-16 14:15:24 -0700 |
commit | c813e04414b7b6a19988b32062f95ce008e7de27 (patch) | |
tree | e023faf54257818f44ddf8ccc11e93ff052a77cb /debian | |
parent | 4114c00f5b91726c0d247686c11fdac06e1a95f4 (diff) |
refresh patch series
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/patches/Fix-palette-handling-for-Pillow-9.1.0.patch | 46 | ||||
-rw-r--r-- | debian/patches/docs-build-use-DEB_VERSION_UPSTREAM.patch | 6 | ||||
-rw-r--r-- | debian/patches/drop-installation-from-docs-contents.patch | 4 | ||||
-rw-r--r-- | debian/patches/series | 1 |
5 files changed, 6 insertions, 52 deletions
diff --git a/debian/changelog b/debian/changelog index 7c8d229..5e32392 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ pikepdf (5.4.2+dfsg-1) UNRELEASED; urgency=medium * New upstream release. * Drop python3-setuptools-scm-git-archive, python3-sphinx-panels build-deps. * Add python3-sphinx-design build-dep. + * Refresh patch series. -- Sean Whitton <spwhitton@spwhitton.name> Tue, 16 Aug 2022 14:04:04 -0700 diff --git a/debian/patches/Fix-palette-handling-for-Pillow-9.1.0.patch b/debian/patches/Fix-palette-handling-for-Pillow-9.1.0.patch deleted file mode 100644 index e74a180..0000000 --- a/debian/patches/Fix-palette-handling-for-Pillow-9.1.0.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: "James R. Barlow" <james@purplerock.ca> -Date: Fri, 15 Apr 2022 00:58:07 -0700 -Subject: Fix palette handling for Pillow 9.1.0 - -(cherry picked from commit 4f6923fe33c2d7e78d1482a5eb2beb6e9155977b) ---- - src/pikepdf/models/_transcoding.py | 9 ++++----- - tests/test_image_access.py | 3 ++- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/pikepdf/models/_transcoding.py b/src/pikepdf/models/_transcoding.py -index 7e26381..1bfc3d1 100644 ---- a/src/pikepdf/models/_transcoding.py -+++ b/src/pikepdf/models/_transcoding.py -@@ -163,13 +163,12 @@ def fix_1bit_palette_image( - im: Image.Image, base_mode: str, palette: BytesLike - ) -> Image.Image: - """Apply palettes to 1-bit images.""" -- if base_mode == 'RGB' and palette != b'\x00\x00\x00\xff\xff\xff': -+ if base_mode == 'RGB': - im = im.convert('P') -+ if len(palette) == 6: -+ # rgbrgb -> rgb000000...rgb -+ palette = palette[0:3] + (b'\x00\x00\x00' * (256 - 2)) + palette[3:6] - im.putpalette(palette, rawmode=base_mode) -- gp = im.getpalette() -- if gp: -- gp[765:768] = gp[3:6] # work around Pillow bug -- im.putpalette(gp) - elif base_mode == 'L' and palette != b'\x00\xff': - im = im.convert('P') - try: -diff --git a/tests/test_image_access.py b/tests/test_image_access.py -index 512c2ca..11a3b97 100644 ---- a/tests/test_image_access.py -+++ b/tests/test_image_access.py -@@ -516,7 +516,8 @@ def test_image_palette(resources, filename, bpc, rgb): - outstream = BytesIO() - pim.extract_to(stream=outstream) - -- im = pim.as_pil_image().convert('RGB') -+ im_pal = pim.as_pil_image() -+ im = im_pal.convert('RGB') - assert im.getpixel((1, 1)) == rgb - - diff --git a/debian/patches/docs-build-use-DEB_VERSION_UPSTREAM.patch b/debian/patches/docs-build-use-DEB_VERSION_UPSTREAM.patch index 82744c2..ce5e726 100644 --- a/debian/patches/docs-build-use-DEB_VERSION_UPSTREAM.patch +++ b/debian/patches/docs-build-use-DEB_VERSION_UPSTREAM.patch @@ -8,7 +8,7 @@ Subject: docs build use DEB_VERSION_UPSTREAM --- a/docs/conf.py +++ b/docs/conf.py -@@ -75,8 +75,6 @@ autodoc_typehints = 'description' +@@ -92,8 +92,6 @@ autodoc_typehints = 'description' sys.path.insert(0, os.path.join(os.path.abspath('.'), './_ext')) sys.path.insert(0, os.path.join(os.path.abspath('.'), '..')) @@ -17,11 +17,11 @@ Subject: docs build use DEB_VERSION_UPSTREAM # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -@@ -136,7 +134,7 @@ author = 'James R. Barlow' +@@ -138,7 +136,7 @@ author = 'James R. Barlow' # |version| and |release|, also used in various other places throughout the # built documents. --release = get_distribution('pikepdf').version +-release = pikepdf.__version__ +release = os.environ['DEB_VERSION_UPSTREAM'] version = '.'.join(release.split('.')[:2]) diff --git a/debian/patches/drop-installation-from-docs-contents.patch b/debian/patches/drop-installation-from-docs-contents.patch index ff08b31..cdaf993 100644 --- a/debian/patches/drop-installation-from-docs-contents.patch +++ b/debian/patches/drop-installation-from-docs-contents.patch @@ -8,11 +8,11 @@ Subject: drop installation from docs contents --- a/docs/index.rst +++ b/docs/index.rst -@@ -117,7 +117,6 @@ practical examples, particular in ``pdfi +@@ -124,7 +124,6 @@ practical examples, particular in ``pdfi :caption: Introduction :name: intro_toc - installation - release_notes tutorial + .. toctree:: diff --git a/debian/patches/series b/debian/patches/series index 93e1509..887982c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ docs-build-use-DEB_VERSION_UPSTREAM.patch drop-installation-from-docs-contents.patch drop-save-pike.patch -Fix-palette-handling-for-Pillow-9.1.0.patch |