-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conda package #119
Comments
Hi @mara004, I see that you already created the package 👍 Let me know if you want to add it to the CI. Best regards, |
Hi @bblanchon, oh, but that was not me! 🙃 When I searched before posting this issue I couldn't find that package yet. However, his builds require manual interaction, and you can see from the https://anaconda.org/main/pdfium-binaries/files tab that he's not building the whole intersection of platforms supported by pdfium-binaries and conda, e.g. linux-32, linux-armv7l, win-32 and win-arm64 are missing. So I think it would still be good to integrate conda into pdfium-binaries CI. |
Don't worry, I can handle the CI part 😎; I just need to know what to do. |
@bblanchon I've just made a draft PR with packaging except for the CI part: #120 |
I'll integrate this into the build and get back to you. |
The first batch of Conda packages is available: |
Thanks a lot for your effort! We definitely need to think about testing. |
Nice catch! I’ll fix the glob. |
Also, while the windows packages do contain their binaries, I think they're not properly following conda conventions yet. https://docs.conda.io/projects/conda-build/en/latest/user-guide/environment-variables.html says
See also the table from #121 (comment). |
That part didn’t make any sense so I decided to use the same layout and see if it works. |
Separate thread: when trying to install the linux package locally using |
Hmm, I think that's just some conda convention to put stuff in a |
I downloaded the packages for lxml and they share the same layout: However, they don't have the same layout as ours. PS: I just started another build that should fix the missing dylib and the build_number |
Well, lxml is a python package (with API level bindings). I'm under the impression conda python packages might have a bit of an own layout. It would be interesting to find another "C library only" windows package and see what layout it uses.
Thanks! |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
OK conda clean did the trick. The build_number error might have been for unrelated reasons, I'm not sure.
|
Can you add a |
I'm not used to That said, I don't think it leads us anywhere, and this is not very nice to debug because the code is in |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
With the same command, I get:
It turns out, it expects an undocumented |
After adding |
Interesting. Unfortunately I'm still stuck with the same error desipte the new build. |
I tried again with the Docker images C:\> docker run --rm -v %CD%:/host continuumio/miniconda3 conda install /host/pdfium-binaries-118.0.5975.0-1.tar.bz2
Downloading and Extracting Packages
Downloading and Extracting Packages
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done |
Nice. I will uninstall distro conda (actually more commands randomly fail) and reinstall miniconda cleanly, then test the linux package again. It might take some time. You don't need to wait for me if you think this is ready. PS: The full version (e.g. |
Can't you pin to |
That often stays the same across different builds. I probably have to pin to an exact build because that's what the bindings file is tied to. |
OK nevermind about version, I think we can handle this. |
I tested again with a Fedora image and it works. Here is the FROM fedora:37
RUN mkdir -p ~/miniconda3
RUN curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o ~/miniconda3/miniconda.sh
RUN bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
RUN rm -rf ~/miniconda3/miniconda.sh
RUN ~/miniconda3/bin/conda init bash Here is the command I ran: # conda install --offline pdfium-binaries-118.0.5975.0-1.tar.bz2
Downloading and Extracting Packages
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: done |
my apologies for my silence. This thread is getting very long very quickly. Could you give me a brief summary what you guys are trying to do? I may also package that using our standard recipe methods so you can simply pull it from Answering a few questions:
you could specify in the conda recipe something along the lines of:
If you're referring to the feedstock where we keep our recipes, unfortunately I cannot. Those recipes are meant to be managed by the anaconda organization (they're not community repos). The good news is that I am very close to patching the |
@bblanchon OK. This is good because it suggests the packages are fine. Maybe there is some broken leftover from my former distro install of conda. I'll check. @boldorider4 Thanks for joining this thread (sorry it grew so long). I'll reply to the questions directed at me later when I have more time. |
Answer part 1:
TLDR We're trying to integrate conda packaging into pdfium-binaries CI directly to avoid dependence on a third party and necessity of manual interaction, and to package for all supported platforms.
@bblanchon wrote a custom script (not a recipe) because of problems with
Due to the direct integration we're trying to achieve, it is not possible to "merge" this into
Local installation works fine for @bblanchon but fails for me. I'm currently investigating why. This may not be overly relevant for the purposes of this thread, though.
We were takling about the version specifier in pdfium-binaries and a possible pin in the upcoming requirements section in pypdfium2's recipe, not about the source section of a third-party style recipe. 😅
See the second paragraph of the |
OK, I see what you're doing.
Where |
@boldorider4 You may submit your patch as draft PR, then I can take a look (I'll leave it up to you whether to target However, I doubt if this will actually be necessary. You can already set That said, as I plan to do the conda packaging myself properly anyway, I'm not particularly enthusiastic to aid a simultaneous paid third-party packaging project that will probably not even make the results public. Footnotes |
I was talking about the package named "pdfium-binaries" on Conda, not about the GitHub repo.
But then which package
Do you mean we cannot build the package in a GitHub workflow? |
If
I believe |
BTW, this SO thread sounds related to my offline install problems.
|
RE #119 (comment):
@bblanchon That's a good point. I guess we could prevent this by nesting the headers in an own pdfium subdirectory in the tarball, so the layout would be Also, a loose |
@boldorider4, what's the status of this package? |
@bblanchon I have already been wondering what we are waiting for. What exactly do you want from @boldorider4? The ownership question, I suppose? As to that, I think he already indicated it's out of his hands. |
I, too, wondered what we were waiting for. |
Well, for the reasons stated in #119 (comment): it isn't build regularly and not for all platforms, it's not in our control (e.g. might go non-public or stop being updated in the future), and not implemented elegantly. |
@mara004 @bblanchon correctly that's the plan after pypdfium2 is available i can go ahead on doctr 😁 |
@felixdittrich92 Question BTW: How can we enforce a dependency to be supplied from a specific channel in the |
@bblanchon Thanks a lot! |
And I still believe changing |
The empty dash is because the "build" field is empty.
I didn't know what to put there, so I kept it empty. |
Ah, I see. Apparently conda sets this to some "{hash}_{build_number}" format. Not sure how they're generating the hash, though... The good news is, installing pdfium-binaries now works for me, even offline. |
I reupload everything, I don't know why they where missing. |
@mara004 Yes see: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-file-manually This should work the same way for |
@mara004 I reuploaded all the packages with headers in |
Coming in very late, but quite happy to see pypdfium is getting closer to a conda release ! |
Hi @bblanchon,
There have been some requests (e.g. from doctr) that pypdfium2 should have a conda package.
Basically the pre-requisite for this would be a conda package for pdfium (see below).
The Readme says:
Unfortunately, my knowledge about conda is very limited as I don't use it personally, but this would be my idea of the workflow:
conda/recipe/meta.yaml
, spec)version: {{ environ["VERSION"] }}
)build.sh
/bld.bat
scripts.conda build conda/ --output-folder conda/out/
in each runner after the binary was builtconda convert conda/out/$HOST_PLATFORM/*.tar.bz2 -p $TARGET_PLATFORM -o conda/out/
(for a list of conda platform names, see the choices for-p
inconda convert --help
)actions/upload-artifact
,conda/out/$TARGET_PLATFORM/*.tar.gz
)ANACONDA_API_TOKEN=... anaconda upload $PACKAGES_DIR/*/*.tar.bz2
- not sure, probably something like this)Presumably we need the action
conda-incubator/setup-miniconda
.Why we need this
Initially I intended to bundle the binaries in pypdfium2's conda packages (as we do for PyPI wheels), but it turns out this is not really the way to go:
n_py_versions - 1
unnecessary packages. If pdfium is packaged separately, pypdfium2 can just depend on that and cleanly specifynoarch: python
.The text was updated successfully, but these errors were encountered: