Skip to content
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

Docs: Add description of olefile to "External Libraries" #7502

Closed
wants to merge 2 commits into from

Conversation

F30
Copy link

@F30 F30 commented Oct 29, 2023

olefile became an optional dependency in commit 9175706, but it hasn't been mentioned in the library list so far.

docs/installation.rst Outdated Show resolved Hide resolved
radarhere
radarhere previously approved these changes Oct 29, 2023
@nulano
Copy link
Contributor

nulano commented Oct 30, 2023

I'm not sure this is the right place to mention this library. olefile is a Python library, not a native library, so it probably shouldn't be under the "Building from source" heading.

I am surprised it is not mentioned in docs/handbook/image-file-formats.rst for the two file types it is used for, MIC and FPX.
Edit: I see now @radarhere has created #7503 to add it there.

@radarhere
Copy link
Member

I've created PR #7509 as an alternative to this, mentioning olefile under 'Basic Installation' instead.

olefile became an optional dependency in commit 9175706, but it hasn't
been mentioned in the library list so far.
@F30
Copy link
Author

F30 commented Nov 2, 2023

I'm not sure this is the right place to mention this library. olefile is a Python library, not a native library, so it probably shouldn't be under the "Building from source" heading.

I agree that this is a bit convoluted. While the general headline is "Building From Source", the specific section just lists external libraries and does not distinguish between build and runtime dependencies.

An even more complex situation occurs for tcl/tk: Even though listed here and in the package lists below, Tcl and Tk headers are actually not required to build Pillow. (I tried that on Debian and Alpine.) What is required at runtime are that tkinter Python bindings, which are part of the Python standard library, but packaged separately by most distributions.

I have added another commit (8a87d37) to mention tkinter and move non-library dependencies to the bottom of the list (not that there was consistent ordering in the first place). This is still not ideal and somewhat inconsistent with the package lists below, but better than the status quo.

I've created PR #7509 as an alternative to this, mentioning olefile under 'Basic Installation' instead.

I also like that PR, but I think the information should be available in both places.

@hugovk
Copy link
Member

hugovk commented Nov 3, 2023

#7509 has been merged. Please could you update this PR from main so we can see them both combined?

@radarhere radarhere mentioned this pull request Nov 11, 2023
@radarhere radarhere dismissed their stale review November 13, 2023 23:08

Further discussion has occurred

@radarhere
Copy link
Member

radarhere commented Nov 20, 2023

the specific section just lists external libraries and does not distinguish between build and runtime dependencies.

libraqm does provide some information on this front.

Screenshot 2023-11-20 at 5 57 48 pm

I've created #7562 to update the description of tcl/tk, explaining that it was once a build dependency, but no longer.

@radarhere
Copy link
Member

Please could you update this PR from main so we can see them both combined?

Here's a link to that version of the docs if it is helpful - https://pillow-radarhere.readthedocs.io/en/olefile-docs/installation.html

I don't have permissions to merge main into this.

@hugovk
Copy link
Member

hugovk commented Nov 20, 2023

@aclark4life Please could you enable this setting at https://github.com/python-pillow/Pillow/settings so we can update PRs from main?

image

@radarhere
Copy link
Member

radarhere commented Nov 20, 2023

What is required at runtime are that tkinter Python bindings, which are part of the Python standard library, but packaged separately by most distributions.

I have added another commit (8a87d37) to mention tkinter

I don't think Pillow requires tkinter, it just interfaces with it. If you don't have tkinter installed, you are not missing out on any Pillow functionality. For a similar example, Pillow doesn't require NumPy - unless you're trying to pass data between Pillow and NumPy. I don't think these are things that users need to concern themselves with if their goal is just to install Pillow.

As for olefile, my vote is also that between mentioning it in the 'Basic Installation' and 'Image file formats'. it is sufficiently documented. If you discover after installation that you want to install it, then that is fairly trivial to do.

@F30
Copy link
Author

F30 commented Nov 22, 2023

I don't think Pillow requires tkinter, it just interfaces with it. If you don't have tkinter installed, you are not missing out on any Pillow functionality.

Are you sure about that?

https://pillow.readthedocs.io/en/stable/reference/ImageTk.html says "The ImageTk module contains support to create and modify Tkinter BitmapImage and PhotoImage objects". To me, this sounds like some image formats from the Tk world. But I'm not very familiar with that, so it may also be possible that BitmapImage and PhotoImage are not full-blown image formats, but just useful for building UIs.

@radarhere
Copy link
Member

"Tkinter BitmapImage and PhotoImage objects" aren't images that exist on disk, they're Python objects.

@radarhere
Copy link
Member

#7563 has also been merged, documenting the use of olefile further in a way, by adding it as an optional dependency to pyproject.toml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants