From 9cb5c38e0719964268d5a14ae6aed3d730e5dfaa Mon Sep 17 00:00:00 2001 From: geisserml Date: Wed, 7 Feb 2024 15:50:37 +0100 Subject: [PATCH] Remove some legacy code for conda_raw Note: At the time of writing, this renders the package unbuildable because we have nothing between 6164 (legacy) and 6219 (broken). But this will soon change when pypdfium2_raw is rebuilt against pdfium-binaries 6281, which will happen before the next helpers release. --- conda/helpers/recipe/meta.yaml | 10 +++++----- src/pypdfium2/__main__.py | 10 ++-------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/conda/helpers/recipe/meta.yaml b/conda/helpers/recipe/meta.yaml index 831a5b66d..987ad2648 100644 --- a/conda/helpers/recipe/meta.yaml +++ b/conda/helpers/recipe/meta.yaml @@ -30,12 +30,12 @@ requirements: - setuptools - wheel !=0.38.0,!=0.38.1 run: - # Set an upper boundary for pypdfium2_raw as defined in craft_packages.py - # NOTE There currently is no significant minimum pdfium requirement, but we could add one should the necessity arise. - # pdfium 6219: blacklisted due to https://crbug.com/pdfium/2112 - # (6205 is also affected, but not on conda due to monthly schedule) + # -- Reasons for pdfium version bounds -- + # >6164 : API-breaking changes to ctypesgen + # !=6219 : Blacklisted due to https://crbug.com/pdfium/2112 (6205 is also affected, but not on conda due to monthly schedule) + # <={{ pdfium_max }} : Prevents future versions for API safety reasons - python - - pypdfium2-team::pypdfium2_raw <={{ pdfium_max }},!=6219 + - pypdfium2-team::pypdfium2_raw >6164,!=6219,<={{ pdfium_max }} test: requires: diff --git a/src/pypdfium2/__main__.py b/src/pypdfium2/__main__.py index bd11420ba..55e5f1826 100644 --- a/src/pypdfium2/__main__.py +++ b/src/pypdfium2/__main__.py @@ -7,14 +7,8 @@ from pypdfium2.version import PYPDFIUM_INFO, PDFIUM_INFO from pypdfium2._cli._parsers import setup_logging -try: - from pypdfium2_raw.bindings import _libs_info - pdfium_path = _libs_info["pdfium"]["path"] -except ImportError: - # retained for downward compatibility with conda pypdfium2_raw <= 6164 by date of initial build - # actually it's the ctypesgen version that matters, but we don't have info about that - from pypdfium2_raw.bindings import _loader_info - pdfium_path = _loader_info["libpath"] +from pypdfium2_raw.bindings import _libs_info +pdfium_path = _libs_info["pdfium"]["path"] SubCommands = { "arrange": "rearrange/merge documents",