From 3aa678fde28c93dd9c394664f07d7d72820224b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 6 Jul 2022 10:05:30 +0000 Subject: [PATCH] python310Packages.pikepdf: 5.2.0 -> 5.3.1 https://github.com/pikepdf/pikepdf/blob/v5.3.1/docs/releasenotes/version5.rst --- .../python-modules/pikepdf/default.nix | 4 ++-- .../python-modules/pikepdf/paths.patch | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/pikepdf/default.nix b/pkgs/development/python-modules/pikepdf/default.nix index ec95bd24fc88..07b2389039b6 100644 --- a/pkgs/development/python-modules/pikepdf/default.nix +++ b/pkgs/development/python-modules/pikepdf/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { pname = "pikepdf"; - version = "5.2.0"; + version = "5.3.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -39,7 +39,7 @@ buildPythonPackage rec { postFetch = '' rm "$out/.git_archival.txt" ''; - hash = "sha256-el7gnqnk8Mp5rpn8Q3WKOTAuB11j4ByCq2Gf60LBBEI="; + hash = "sha256-QYSI0oWuDw19EF8pwh3t1+VOY3Xe/AZxL1uARufg/nE="; }; patches = [ diff --git a/pkgs/development/python-modules/pikepdf/paths.patch b/pkgs/development/python-modules/pikepdf/paths.patch index 7db73bb1a6dd..5f21da38fae3 100644 --- a/pkgs/development/python-modules/pikepdf/paths.patch +++ b/pkgs/development/python-modules/pikepdf/paths.patch @@ -1,8 +1,8 @@ diff --git a/src/pikepdf/_methods.py b/src/pikepdf/_methods.py -index 87e99fe..253a701 100644 +index 2a170c6..5ee3ba1 100644 --- a/src/pikepdf/_methods.py +++ b/src/pikepdf/_methods.py -@@ -204,7 +204,7 @@ def _mudraw(buffer, fmt) -> bytes: +@@ -80,7 +80,7 @@ def _mudraw(buffer, fmt) -> bytes: tmp_in.flush() proc = run( @@ -12,10 +12,10 @@ index 87e99fe..253a701 100644 check=True, ) diff --git a/src/pikepdf/jbig2.py b/src/pikepdf/jbig2.py -index 04c762d..924727c 100644 +index be390a1..3818ec3 100644 --- a/src/pikepdf/jbig2.py +++ b/src/pikepdf/jbig2.py -@@ -26,7 +26,7 @@ def extract_jbig2( +@@ -31,7 +31,7 @@ def extract_jbig2( output_path = Path(tmpdir) / "outfile" args = [ @@ -24,7 +24,7 @@ index 04c762d..924727c 100644 "--embedded", "--format", "png", -@@ -59,7 +59,7 @@ def extract_jbig2_bytes(jbig2: bytes, jbig2_globals: bytes) -> bytes: +@@ -64,7 +64,7 @@ def _extract_jbig2_bytes(jbig2: bytes, jbig2_globals: bytes) -> bytes: output_path = Path(tmpdir) / "outfile" args = [ @@ -33,12 +33,12 @@ index 04c762d..924727c 100644 "--embedded", "--format", "png", -@@ -84,7 +84,7 @@ def extract_jbig2_bytes(jbig2: bytes, jbig2_globals: bytes) -> bytes: +@@ -100,7 +100,7 @@ def extract_jbig2_bytes( - def jbig2dec_available() -> bool: + def _check_jbig2dec_available() -> None: # pragma: no cover try: - proc = run(['jbig2dec', '--version'], stdout=PIPE, check=True, encoding='ascii') + proc = run(['@jbig2dec@', '--version'], stdout=PIPE, check=True, encoding='ascii') - except (CalledProcessError, FileNotFoundError): - return False + except (CalledProcessError, FileNotFoundError) as e: + raise DependencyError("jbig2dec - not installed or not found") from e else: