Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 953750 - dev-python/docutils: pillow should be optfeature
Summary: dev-python/docutils: pillow should be optfeature
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-13 00:57 UTC by NRK
Modified: 2025-04-13 12:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NRK 2025-04-13 00:57:27 UTC
According to upstream, it's an optional runtime feature, not a hard dependency:
https://github.com/docutils/docutils/tree/master/docutils#recommendations

Also the current ebuild *already* has an optfeature entry for it:

	optfeature \
		"auto-detecting the image dimensions when using the 'scale' option" \
		dev-python/pillow
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-13 09:19:33 UTC
The dep was added in:

Author: Michał Górny <mgorny@gentoo.org>
Date:   Sat Apr 13 11:45:25 2024 +0200

    dev-python/docutils: Bump to 0.21.1

    Signed-off-by: Michał Górny <mgorny@gentoo.org>


The commit message doesn't say why.

The optfeature was added a while earlier in:

commit 2ece8d0a250f374f58c679b194c599e2f558b4b4
Author: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Date:   Fri Dec 22 23:20:59 2023 -0600

    dev-python/docutils: dev-python/pillow optfeature

    If Pillow is installed, the `image` directive lets you give a `scale`
    option without the corresponding `width` and `height` options.

    Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/34437
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-13 09:20:06 UTC
(In reply to Sam James from comment #1)
> The commit message doesn't say why.

My guess is it's a test dependency and upstream don't gracefully skip if it's not available in tests.
Comment 3 NRK 2025-04-13 09:34:54 UTC
> My guess is it's a test dependency and upstream don't gracefully skip if it's not available in tests.

In that case it should be under `test?` in BDEPEND, right?

I also noticed that pygments is claimed optional by upstream as well. So it should be optfeature + test? BDEPEND too.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-13 09:39:23 UTC
(In reply to NRK from comment #3)
> > My guess is it's a test dependency and upstream don't gracefully skip if it's not available in tests.
> 
> In that case it should be under `test?` in BDEPEND, right?
> 

Right. I'm just guessing how it ended up there (it's fairly common to see something tested unconditionally and conclude it's a missing runtime dependency).
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2025-04-13 12:04:38 UTC
I'll remove the redundant optfeature.  There's little cost in having the unconditional pillow dep, compared to having to figure out whether reverse dependencies need it or not.
Comment 6 Larry the Git Cow gentoo-dev 2025-04-13 12:04:44 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6594bd387ae3f7ceae3c3dea100f2202688b38f2

commit 6594bd387ae3f7ceae3c3dea100f2202688b38f2
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2025-04-13 12:03:35 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2025-04-13 12:03:35 +0000

    dev-python/docutils: Remove redundant optfeature for pillow
    
    Bug: https://bugs.gentoo.org/953750
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/docutils/docutils-0.21.2.ebuild | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)