Skip to content

Commit

Permalink
Remove some legacy code for conda_raw
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mara004 committed Feb 7, 2024
1 parent a584927 commit 9cb5c38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
10 changes: 5 additions & 5 deletions conda/helpers/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 2 additions & 8 deletions src/pypdfium2/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9cb5c38

Please sign in to comment.