Skip to content

Commit

Permalink
readme: move down conda
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Dec 29, 2023
1 parent ba2db80 commit a521a6e
Showing 1 changed file with 63 additions and 63 deletions.
126 changes: 63 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,69 +24,6 @@ pypdfium2 includes helpers to simplify common use cases, while the raw PDFium/ct
This will use a pre-built wheel package, the easiest way of installing pypdfium2.


* <a id="user-content-install-conda" class="anchor" href="#install-conda">From Conda 🔗</a>

_**Beware:** Any conda packages/recipes of pypdfium2 or pdfium-binaries that might be provided by other distributors, including `anaconda/main` or `conda-forge` default channels, are [unofficial](#install-unofficial)._

+ To install

With permanent channel config (encouraged):
```bash
conda config --add channels bblanchon
conda config --add channels pypdfium2-team
conda config --set channel_priority strict
conda install pypdfium2-team::pypdfium2_helpers
```

Alternatively, with temporary channel config:
```bash
conda install pypdfium2-team::pypdfium2_helpers --override-channels -c pypdfium2-team -c bblanchon
```

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`.)
Otherwise, you should be cautious when making changes to the environment.

+ To depend on pypdfium2 in a `conda-build` recipe
```yaml
requirements:
run:
- pypdfium2-team::pypdfium2_helpers
```
You'll want to have downstream callers handle the custom channels as shown above, otherwise conda will not be able to satisfy requirements.
+ To set up channels in a GH workflow
```yaml
- name: ...
uses: conda-incubator/setup-miniconda@v2
with:
# ... your options
channels: pypdfium2-team,bblanchon
channel-priority: strict
```
This is just a suggestion, you can also call `conda config` manually, or pass channels on command basis using `-c`, as discussed above.
+ To verify the sources
```bash
conda list --show-channel-urls "pypdfium2|pdfium-binaries"
conda config --show-sources
```
The table should show `pypdfium2-team` and `bblanchon` in the channels column.
If added permanently, the config should also include these channels, ideally with top priority.
Please check this before reporting any issue with a conda install of pypdfium2.
_**Note:** Conda packages are normally managed using recipe feedstocks driven by third parties, in a Linux repository like fashion. However, with some quirks it is also possible to do conda packaging within the original project and publish to a custom channel, which is what pypdfium2-team does, and the above instructions are referring to._
* <a id="user-content-install-unofficial" class="anchor" href="#install-unofficial">Unofficial packages 🔗</a>
The authors of this project have no control over and are not responsible for possible third-party builds of pypdfium2, and we do not support them. Please use the official packages where possible.
If you have an issue with a third-party build, either contact your distributor, or try to reproduce with an official build.
Do not expect us to help with the creation of unofficial builds or add/change code for downstream setup tasks. Related issues or PRs may be closed without further notice if we don't see fit for upstream.

If you are a third-party distributor, please point out clearly and visibly in the description that your package is unofficial, i.e. not affiliated with or endorsed by pypdfium2 team.


* <a id="user-content-install-source" class="anchor" href="#install-source">From source 🔗</a>

* Dependencies:
Expand Down Expand Up @@ -173,6 +110,69 @@ pypdfium2 includes helpers to simplify common use cases, while the raw PDFium/ct
[^pdfium_buildsystem]: This means pdfium may not compile on arbitrary hosts. The script is limited to build hosts supported by Google's toolchain. Ideally, we'd need an alternative build system that runs with system packages instead.
* <a id="user-content-install-conda" class="anchor" href="#install-conda">From Conda 🔗</a>
_**Beware:** Any conda packages/recipes of pypdfium2 or pdfium-binaries that might be provided by other distributors, including `anaconda/main` or `conda-forge` default channels, are [unofficial](#install-unofficial)._
+ To install
With permanent channel config (encouraged):
```bash
conda config --add channels bblanchon
conda config --add channels pypdfium2-team
conda config --set channel_priority strict
conda install pypdfium2-team::pypdfium2_helpers
```
Alternatively, with temporary channel config:
```bash
conda install pypdfium2-team::pypdfium2_helpers --override-channels -c pypdfium2-team -c bblanchon
```
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`.)
Otherwise, you should be cautious when making changes to the environment.
+ To depend on pypdfium2 in a `conda-build` recipe
```yaml
requirements:
run:
- pypdfium2-team::pypdfium2_helpers
```
You'll want to have downstream callers handle the custom channels as shown above, otherwise conda will not be able to satisfy requirements.
+ To set up channels in a GH workflow
```yaml
- name: ...
uses: conda-incubator/setup-miniconda@v2
with:
# ... your options
channels: pypdfium2-team,bblanchon
channel-priority: strict
```
This is just a suggestion, you can also call `conda config` manually, or pass channels on command basis using `-c`, as discussed above.
+ To verify the sources
```bash
conda list --show-channel-urls "pypdfium2|pdfium-binaries"
conda config --show-sources
```
The table should show `pypdfium2-team` and `bblanchon` in the channels column.
If added permanently, the config should also include these channels, ideally with top priority.
Please check this before reporting any issue with a conda install of pypdfium2.
_**Note:** Conda packages are normally managed using recipe feedstocks driven by third parties, in a Linux repository like fashion. However, with some quirks it is also possible to do conda packaging within the original project and publish to a custom channel, which is what pypdfium2-team does, and the above instructions are referring to._
* <a id="user-content-install-unofficial" class="anchor" href="#install-unofficial">Unofficial packages 🔗</a>
The authors of this project have no control over and are not responsible for possible third-party builds of pypdfium2, and we do not support them. Please use the official packages where possible.
If you have an issue with a third-party build, either contact your distributor, or try to reproduce with an official build.
Do not expect us to help with the creation of unofficial builds or add/change code for downstream setup tasks. Related issues or PRs may be closed without further notice if we don't see fit for upstream.
If you are a third-party distributor, please point out clearly and visibly in the description that your package is unofficial, i.e. not affiliated with or endorsed by pypdfium2 team.
### Runtime Dependencies
As of this writing, pypdfium2 does not need any mandatory runtime dependencies apart from Python itself.
Expand Down

0 comments on commit a521a6e

Please sign in to comment.