Skip to content

Commit

Permalink
Fix conda packaging (upstream behavior change) (#314)
Browse files Browse the repository at this point in the history
* Try to fix conda not finding external deps

* Prepare changelog
  • Loading branch information
mara004 authored May 19, 2024
1 parent a07372d commit 3fd35cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pypdfium2 includes helpers to simplify common use cases, while the raw PDFium/ct
Alternatively, with temporary channel config:
```bash
conda install pypdfium2-team::pypdfium2_helpers --override-channels -c pypdfium2-team -c bblanchon
conda install pypdfium2-team::pypdfium2_helpers --override-channels -c pypdfium2-team -c bblanchon -c defaults
```
Adding the channels permanently and tightening priority is encouraged to include pypdfium2 in `conda update` by default, and to avoid accidentally replacing the install with a different channel. (If desired, you may limit the channel config to the current environment by adding `--env`.)
Expand Down
2 changes: 2 additions & 0 deletions docs/devel/changelog_staging.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
# Changelog for next release
- `PdfPage.get_objects()`: Don't register pageobjects as children, because they don't need to be closed by the caller when part of a page. This avoids excessive caching of weakrefs that are not cleaned up with the object they refer to.
- Autorelease: Swapped default condition for minor/patch update, as pypdfium2 changes are likely more API-significant than pdfium updates. Added ability for manual override.
- Fixed conda packaging: It is now required to explicitly specify `-c defaults` with `--override-channels`, presumably due to an upstream change.
- Bumped workflows to Python 3.12.
4 changes: 2 additions & 2 deletions setupsrc/pypdfium2_setup/craft_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def main_conda_raw(args):
os.environ["BUILD_NUM"] = str(_get_build_num(args))
emplace_func = partial(prepare_setup, ExtPlats.system, args.pdfium_ver, use_v8=None)
with CondaExtPlatfiles(emplace_func):
run_conda_build(CondaDir/"raw", CondaDir/"raw"/"out", args=["--override-channels", "-c", "bblanchon"])
run_conda_build(CondaDir/"raw", CondaDir/"raw"/"out", args=["--override-channels", "-c", "bblanchon", "-c", "defaults"])


def main_conda_helpers(args):
Expand All @@ -149,7 +149,7 @@ def main_conda_helpers(args):

# NOTE To build with a local pypdfium2_raw, add the args below for the source dir, and remove the pypdfium2-team prefix from the helpers recipe's run requirements
# args=["-c", CondaDir/"raw"/"out"]
run_conda_build(CondaDir/"helpers", CondaDir/"helpers"/"out", args=["--override-channels", "-c", "pypdfium2-team", "-c", "bblanchon"])
run_conda_build(CondaDir/"helpers", CondaDir/"helpers"/"out", args=["--override-channels", "-c", "pypdfium2-team", "-c", "bblanchon", "-c", "defaults"])


class ArtifactStash:
Expand Down

0 comments on commit 3fd35cf

Please sign in to comment.