Summary: | media-gfx/inkscape-1.4-r1 fails to find dev-python/numpy at runtime | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Matt Whitlock <gentoo> |
Component: | Current packages | Assignee: | Andreas K. Hüttel <dilfridge> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | gentoo, parona, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=947738 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 923255 |
Description
Matt Whitlock
2024-02-17 06:12:20 UTC
inkscape uses python-single-r1, so python_fix_shebang or similar needs to be used on its installed scripts. (In reply to Sam James from comment #1) > inkscape uses python-single-r1, so python_fix_shebang or similar needs to be > used on its installed scripts. .. if there's no shebang on them (can't check right now), and inkscape is doing something else (if it does, say, python /path/to/foo.py), then ofc a different strategy may be needed I can confirm that launching Inkscape using the command line "EPYTHON=python3.11 inkscape" does allow the plugin to work as expected. Munging the shebang lines in the extension scripts (yes, they do have them) would probably also work, but I haven't tried it. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f3867c8f2e4b1f7dcaa0c2e19812b3133bed141 commit 8f3867c8f2e4b1f7dcaa0c2e19812b3133bed141 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-03-12 00:49:40 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-03-12 00:52:22 +0000 media-gfx/inkscape: fix Python dependencies & shebangs * Fix Python dependency (needs pillow for jpeg/tiff/webp at least) * Fix shebangs on Python extensions so we respect PYTHON_SINGLE_TARGET Closes: https://bugs.gentoo.org/924747 Closes: https://bugs.gentoo.org/922320 Signed-off-by: Sam James <sam@gentoo.org> media-gfx/inkscape/inkscape-1.3.2-r1.ebuild | 208 ++++++++++++++++++++++++++++ media-gfx/inkscape/inkscape-9999.ebuild | 5 +- 2 files changed, 210 insertions(+), 3 deletions(-) Either this has broken again, or it was never really fixed. Today I tried saving an drawing using the "Optimized SVG" output format, which delegates to the output_scour.py Inkscape extension. I got this error: Traceback (most recent call last): File "/usr/share/inkscape/extensions/output_scour.py", line 6, in <module> import inkex File "/usr/share/inkscape/extensions/inkex/__init__.py", line 11, in <module> from .extensions import * File "/usr/share/inkscape/extensions/inkex/extensions.py", line 32, in <module> from .utils import errormsg, Boolean File "/usr/share/inkscape/extensions/inkex/utils.py", line 34, in <module> import numpy as np ModuleNotFoundError: No module named 'numpy' dev-python/numpy is installed for Python 3.11 and 3.12 but not for 3.13. When I launch Inkscape using "EPYTHON=python3.12 inkscape", then the output plugin works fine. The shebang line in /usr/share/inkscape/extensions/output_scour.py is #!/usr/bin/python3.12, so I think there needs to be a different solution, as evidently Inkscape is not executing the script in a manner that respects the shebang line. To be sure, I can run "python3.12 -c 'import numpy'" with no error, but "python -c 'import numpy'" throws a ModuleNotFoundError. |