Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 901997 - media-libs/lensfun-0.3.4_rc1: error when running lensfun-update-data: ModuleNotFoundError: No module named 'lensfun'
Summary: media-libs/lensfun-0.3.4_rc1: error when running lensfun-update-data: ModuleN...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-18 07:19 UTC by Miroslav Šulc
Modified: 2024-01-12 16:53 UTC (History)
3 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 Miroslav Šulc gentoo-dev 2023-03-18 07:19:47 UTC
i can't run this tool, it fails with the following error:

Traceback (most recent call last):
  File "/usr/bin/lensfun-update-data", line 46, in <module>
    import lensfun
ModuleNotFoundError: No module named 'lensfun'


[ebuild   R    ] media-libs/lensfun-0.3.4_rc1::gentoo  USE="-doc -test" CPU_FLAGS_X86="sse sse2" PYTHON_SINGLE_TARGET="python3_10 -python3_9 -python3_11" 0 KiB
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2023-04-02 13:47:11 UTC
Getting this during installation phase, no wonder the python parts are missing:


-- Installing: /tmp/portage/media-libs/lensfun-0.3.3/image/usr/bin/g-lensfun-update-data
-- Installing: /tmp/portage/media-libs/lensfun-0.3.3/image/usr/bin/lensfun-add-adapter
-- Installing: /tmp/portage/media-libs/lensfun-0.3.3/image/usr/bin/lensfun-update-data
/usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
TEST FAILED: /tmp/portage/media-libs/lensfun-0.3.3/image/usr/lib/python3.10/site-packages/ does NOT support .pth files
bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /tmp/portage/media-libs/lensfun-0.3.3/image/usr/lib/python3.10/site-packages/

and your PYTHONPATH environment variable currently contains:

    ''

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#custom-installation-locations


Please make the appropriate changes for your system and try again.
listing git files failed - pretending there aren't any
warning: build_py: byte-compiling is disabled, skipping.

warning: install_lib: byte-compiling is disabled, skipping.

zip_safe flag not set; analyzing archive contents...
 * Optimize Python modules for /usr/lib/python3.10/site-packages
 * Optimize Python modules for /usr/lib/python3.10
>>> Completed installing media-libs/lensfun-0.3.3 into /tmp/portage/media-libs/lensfun-0.3.3/image

 * Final size of build directory: 7936 KiB (7.7 MiB)
 * Final size of installed tree:  4600 KiB (4.4 MiB)

 * QA Notice: setuptools warnings detected:
 * 
 *      easy_install command is deprecated. Use build and pip and other standards-based tools.
 * Verifying compiled files for python3.10
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   /usr/bin/lenstool
   /usr/lib64/liblensfun.so.0.3.3
Comment 2 Markus Meier gentoo-dev 2023-07-03 20:24:55 UTC
@Andreas: do you think something like that would be fine? https://gitweb.gentoo.org/dev/maekke.git/commit/?id=53fde4bcfc4abc06c04199a625fca797dc32d104

at least it seems to "work"...
Comment 3 Larry the Git Cow gentoo-dev 2024-01-12 16:53:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7008130fcca0eb7a631eececdf121bd7e1d90fa8

commit 7008130fcca0eb7a631eececdf121bd7e1d90fa8
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-12 16:51:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-12 16:52:00 +0000

    media-libs/lensfun: add 0.3.4, fix Python handling
    
    Closes: https://bugs.gentoo.org/901997
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/lensfun/Manifest                        |  1 +
 .../lensfun/files/lensfun-0.3.4-python-egg.patch   | 11 ++++
 .../lensfun/files/lensfun-0.3.4-python.patch       | 66 +++++++++++++++++++++
 media-libs/lensfun/lensfun-0.3.4.ebuild            | 68 ++++++++++++++++++++++
 4 files changed, 146 insertions(+)