Bug 2255539 - ModuleNotFoundError: No module named 'lensfun'
Summary: ModuleNotFoundError: No module named 'lensfun'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lensfun
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2257782 2292032 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-21 18:20 UTC by Germano Massullo (Thetra)
Modified: 2024-07-06 07:43 UTC (History)
11 users (show)

Fixed In Version: lensfun-0.3.4-1.el9 lensfun-0.3.4-1.fc40 lensfun-0.3.4-1.fc39
Clone Of:
Environment:
Last Closed: 2024-07-06 01:05:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
contents of the two packages python-lensfun-fc38 and python-fc39 (48.48 KB, image/jpeg)
2024-03-17 17:58 UTC, le.poittevin.laurent
no flags Details

Description Germano Massullo (Thetra) 2023-12-21 18:20:50 UTC
lensfun-update-data  is broken on F39. I don't find a way to fix it. I also tried the new 0.3.4 [1], but it is affected too

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

[1]: https://download.copr.fedorainfracloud.org/results/germano/lensfun/fedora-39-x86_64/06782001-lensfun/

Reproducible: Always

Comment 1 Germano Massullo (Thetra) 2023-12-21 21:57:18 UTC
Checking .pth file support in /builddir/build/BUILDROOT/lensfun-0.3.4-1.fc39.x86_64/usr/lib/python3.12/site-packages/
/usr/bin/python3 -E -c pass
TEST FAILED: /builddir/build/BUILDROOT/lensfun-0.3.4-1.fc39.x86_64/usr/lib/python3.12/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:

    /builddir/build/BUILDROOT/lensfun-0.3.4-1.fc39.x86_64/usr/lib/python3.12/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

Comment 2 Bengt Månsson 2024-01-08 18:01:22 UTC
I have this issue too and it prevents me from building https://github.com/aurelienpierreeng/ansel (a clone of darktable).
Hint: Arch Linux had the same issue, but now solved. Fixed upstream. https://bbs.archlinux.org/viewtopic.php?id=287178

Comment 3 Germano Massullo (Thetra) 2024-01-12 15:52:56 UTC
*** Bug 2257782 has been marked as a duplicate of this bug. ***

Comment 4 Germano Massullo (Thetra) 2024-01-12 16:09:33 UTC
Archlinux maintainer fixed the problem at
https://gitlab.archlinux.org/archlinux/packaging/packages/lensfun/-/commit/453fc27057240712d3d3448246bb19c9f092da09
https://gitlab.archlinux.org/archlinux/packaging/packages/lensfun/-/commit/9901f5cc5cb01960f2d8dfc14ef281fd0db32369

Can anybody please make a pull request for Fedora's lensfun? I don't have time to apply such changes in these days

Archlinux's lensfun commit history: https://gitlab.archlinux.org/archlinux/packaging/packages/lensfun/-/commits/main

Comment 5 le.poittevin.laurent 2024-03-17 17:58:53 UTC
Created attachment 2022154 [details]
contents of the two packages python-lensfun-fc38 and python-fc39

the package in question is python3-lensfun, which does not contain all the elements. Just compare the fc38 and fc39 versions of the package.
I used the files contained in the fc38 package on my fedora 39, renaming the python version from 3.11 to 3.12. It works fine.
I've attached a screenshot showing the contents of the two packages python-lensfun-fc38 and python-fc39 . You can clearly see the difference.

Comment 6 Adam Williamson 2024-06-27 16:36:26 UTC
this is because the python install phase fails, complaining about PYTHONPATH not including the target directory. There's an easy way to fix this, but it still gives us a kinda non-standard Python package because it's using `setup.py install` with a barebones setup.py, I'm seeing if I can shoehorn in use of the modern Python packaging flow somehow to give us a better end result. If not I'll go with the easy fix.

Comment 7 Adam Williamson 2024-06-27 18:21:16 UTC
*** Bug 2292032 has been marked as a duplicate of this bug. ***

Comment 8 Fedora Update System 2024-06-27 18:41:43 UTC
FEDORA-EPEL-2024-b588765354 (lensfun-0.3.4-1.el9) has been submitted as an update to Fedora EPEL 9.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-b588765354

Comment 9 Fedora Update System 2024-06-27 18:41:43 UTC
FEDORA-2024-7ce2e5de3d (lensfun-0.3.4-1.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-7ce2e5de3d

Comment 10 Adam Williamson 2024-06-27 18:46:01 UTC
OK, the new build should fix this, and also includes the current data snapshot out-of-the-box. I went with the approach of disabling upstream's setup.py invocations and using our own build/install macros instead, as this gives us the best quality package. See https://src.fedoraproject.org/rpms/lensfun/c/e9f70e9fd3ee6eeb5f08985087071206b56f78bc?branch=rawhide and https://src.fedoraproject.org/rpms/lensfun/c/b661c761ff0f1f7e803c3bd02182f120618ab29a?branch=rawhide .

Comment 11 Fedora Update System 2024-06-28 01:25:07 UTC
FEDORA-2024-7ce2e5de3d has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-7ce2e5de3d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-7ce2e5de3d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2024-06-28 01:40:22 UTC
FEDORA-2024-b992fae8a1 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-b992fae8a1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-b992fae8a1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2024-06-28 02:21:25 UTC
FEDORA-EPEL-2024-b588765354 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-b588765354

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2024-07-06 01:05:38 UTC
FEDORA-EPEL-2024-b588765354 (lensfun-0.3.4-1.el9) has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2024-07-06 07:08:09 UTC
FEDORA-2024-b992fae8a1 (lensfun-0.3.4-1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2024-07-06 07:43:59 UTC
FEDORA-2024-7ce2e5de3d (lensfun-0.3.4-1.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.