Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lensfun for openSUSE:Factory checked 
in at 2026-01-05 14:51:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lensfun (Old)
 and      /work/SRC/openSUSE:Factory/.lensfun.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lensfun"

Mon Jan  5 14:51:11 2026 rev:54 rq:1325285 version:0.3.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/lensfun/lensfun.changes  2025-08-06 
14:32:52.006966155 +0200
+++ /work/SRC/openSUSE:Factory/.lensfun.new.1928/lensfun.changes        
2026-01-05 14:51:31.794205302 +0100
@@ -1,0 +2,18 @@
+Sat Jan  3 15:56:44 UTC 2026 - Ben Greiner <[email protected]>
+
+-  Remove specfile python package handling and use
+   lensfun-pr2256-setuptools.patch instead.
+   * Backported from gh#lensfun/lensfun#2256
+   * Additionally, disable build isolation for offline build
+   * Replace -m build with -m pip wheel and keep the setup.py for
+     old distro compatibility (Also doesn't build again at install
+     phase)
+
+-------------------------------------------------------------------
+Fri Jan  2 20:56:13 UTC 2026 - Ben Greiner <[email protected]>
+
+- Python Package updates:
+  * Replace deprecated setup.py usage with PEP517 build
+  * It is a pure python package, thus noarch
+
+-------------------------------------------------------------------

New:
----
  lensfun-pr2256-setuptools.patch

----------(New B)----------
  New:-  Remove specfile python package handling and use
   lensfun-pr2256-setuptools.patch instead.
   * Backported from gh#lensfun/lensfun#2256
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lensfun.spec ++++++
--- /var/tmp/diff_new_pack.9gAHHz/_old  2026-01-05 14:51:34.238307096 +0100
+++ /var/tmp/diff_new_pack.9gAHHz/_new  2026-01-05 14:51:34.242307263 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package lensfun
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -30,6 +30,8 @@
 Patch0:         lensfun-cmake4.patch
 # PATCH-FIX-UPSTREAM
 Patch1:         lensfun-python314.patch
+# PATCH-FIX-UPSTREAM lensfun-pr2256-setuptools.patch gh#lensfun/lensfun#2256 
backported and without build isolation for offline build
+Patch2:         lensfun-pr2256-setuptools.patch
 BuildRequires:  cmake
 BuildRequires:  doxygen
 BuildRequires:  fdupes
@@ -37,9 +39,11 @@
 BuildRequires:  libpng-devel
 BuildRequires:  pkgconfig
 BuildRequires:  python-rpm-macros
-BuildRequires:  python3
+BuildRequires:  python3-base
 BuildRequires:  python3-docutils
+BuildRequires:  python3-pip
 BuildRequires:  python3-setuptools
+BuildRequires:  python3-wheel
 BuildRequires:  zlib-devel
 BuildRequires:  pkgconfig(glib-2.0)
 
@@ -93,6 +97,7 @@
 %package -n python3-lensfun
 Summary:        Python3 lensfun bindings
 Requires:       liblensfun%{sonum} = %{version}
+BuildArch:      noarch
 
 %description -n python3-lensfun
 Lensfun bindings for Python 3
@@ -109,6 +114,7 @@
 %package doc
 Summary:        Documentation for lensfun
 Requires:       lensfun-data
+BuildArch:      noarch
 
 %description doc
 Documentation and manual files for the lensfun library/database.
@@ -129,7 +135,10 @@
 sed -i \
     -e "s|^#!/usr/bin/env python3$|#!/usr/bin/python3|g" \
   apps/lensfun-add-adapter \
-  apps/lensfun-update-data \
+  apps/lensfun-update-data
+# remove shebang from non-executable
+sed -i \
+    -e '1 {/^#!/d}' \
   apps/lensfun/__init__.py.in
 
 sed -i 's#/usr/bin/env sh#/usr/bin/sh#' apps/g-lensfun-update-data
@@ -149,16 +158,7 @@
 %install
 %cmake_install
 
-pushd build/apps
-python3 setup.py install --root="%{buildroot}" --skip-build
-popd
-
-# Unneeded
-%if 0%{?suse_version} > 1500
-rm %{buildroot}%{python3_sitelib}/lensfun-*.egg
-%endif
-
-# Create udate folder for lensfun data
+# Create update folder for lensfun data
 mkdir -p %{buildroot}%{_localstatedir}/lib/lensfun-updates
 
 %fdupes %{buildroot}
@@ -187,7 +187,7 @@
 
 %files -n python3-lensfun
 %{python3_sitelib}/lensfun/
-%{python3_sitelib}/lensfun-*.egg-info
+%{python3_sitelib}/lensfun-%{version}.dist-info
 
 %files devel
 %{_includedir}/lensfun/

++++++ lensfun-pr2256-setuptools.patch ++++++
>From 7df6795e5d0fa768132dfce78148b363566de473 Mon Sep 17 00:00:00 2001
From: Jonas Ott <[email protected]>
Date: Sun, 28 Jul 2024 21:54:37 +0200
Subject: [PATCH 1/2] stop deprecated direct call of setup.py, install python
 build in workflows


Index: lensfun-0.3.4/apps/CMakeLists.txt
===================================================================
--- lensfun-0.3.4.orig/apps/CMakeLists.txt
+++ lensfun-0.3.4/apps/CMakeLists.txt
@@ -1,14 +1,13 @@
-IF(WIN32)
-  SET(COMMON_LIBS getopt)
-ENDIF()
-
 IF(BUILD_LENSTOOL)
-    FIND_PACKAGE(PNG REQUIRED)
-    INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
-    INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
-    INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
+    INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
+    INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIRS})
+    INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
     ADD_EXECUTABLE(lenstool lenstool/lenstool.cpp lenstool/image.cpp)
-    TARGET_LINK_LIBRARIES(lenstool lensfun ${COMMON_LIBS} ${PNG_LIBRARY} 
${ZLIB_LIBRARY})
+    TARGET_COMPILE_DEFINITIONS(lenstool PRIVATE -Dauxfun_EXPORTS)
+    TARGET_LINK_LIBRARIES(lenstool lensfun ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
+    IF(WIN32)
+      TARGET_LINK_LIBRARIES(lenstool getopt)
+    ENDIF()
     INSTALL(TARGETS lenstool DESTINATION ${CMAKE_INSTALL_BINDIR})
 ENDIF()
 
@@ -20,27 +19,42 @@ ENDIF(INSTALL_HELPER_SCRIPTS)
 
 
 # Inspired by http://bloerg.net/2012/11/10/cmake-and-distutils.html
+IF(INSTALL_PYTHON_MODULE)
+    FIND_PACKAGE (Python3 COMPONENTS Interpreter REQUIRED)
+    # Windows has a dummy python.exe in the PATH which opens the Microsoft 
Store, so check if Python is real.
+    EXECUTE_PROCESS(COMMAND ${Python3_EXECUTABLE} --version RESULT_VARIABLE 
PY_RESULT OUTPUT_QUIET)
+    IF (NOT PY_RESULT EQUAL 0)
+      MESSAGE(FATAL_ERROR "Python3 not found, it might be a dummy python.exe")
+    ENDIF()
 
-FIND_PROGRAM(PYTHON "python3")
-IF(PYTHON)
-    SET(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
-    SET(SETUP_PY    "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
-    SET(DEPS_IN     "${CMAKE_CURRENT_SOURCE_DIR}/lensfun/__init__.py.in")
-    SET(DEPS        "${CMAKE_CURRENT_BINARY_DIR}/lensfun/__init__.py")
-    SET(OUTPUT      "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")
+    SET(SETUP_PY_IN       "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
+    SET(SETUP_PY          "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
+    SET(PYPROJECT_TOML_IN "${CMAKE_CURRENT_SOURCE_DIR}/pyproject.toml.in")
+    SET(PYPROJECT_TOML    "${CMAKE_CURRENT_BINARY_DIR}/pyproject.toml")
+    SET(DEPS_IN           "${CMAKE_CURRENT_SOURCE_DIR}/lensfun/__init__.py.in")
+    SET(DEPS              "${CMAKE_CURRENT_BINARY_DIR}/lensfun/__init__.py")
+    SET(OUTPUT            "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")
 
+    FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/build/")
+    FILE(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" PY_PACKAGE_DIR)
     CONFIGURE_FILE(${SETUP_PY_IN} ${SETUP_PY})
+    CONFIGURE_FILE(${PYPROJECT_TOML_IN} ${PYPROJECT_TOML})
     CONFIGURE_FILE(${DEPS_IN} ${DEPS})
 
     ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT}
-                       COMMAND ${PYTHON} ${SETUP_PY} build
+                       COMMAND ${Python3_EXECUTABLE} -m pip wheel
+                         --no-build-isolation
+                         --use-pep517
+                         --wheel-dir ${CMAKE_CURRENT_BINARY_DIR}/build
+                         ${CMAKE_CURRENT_BINARY_DIR} 
                        COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}
-                       DEPENDS ${DEPS_IN})
+                       DEPENDS ${PYPROJECT_TOML_IN} ${DEPS_IN})
 
     ADD_CUSTOM_TARGET(python-package ALL DEPENDS ${OUTPUT})
 
-    IF(NOT DEFINED SETUP_PY_INSTALL_PREFIX)
-      SET(SETUP_PY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+    IF(NOT DEFINED PY_INSTALL_PREFIX)
+      SET(PY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
     ENDIF()
-    INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install 
--prefix=\$ENV{DESTDIR}${SETUP_PY_INSTALL_PREFIX})")
-ENDIF(PYTHON)
+    INSTALL(CODE "execute_process(COMMAND ${Python3_EXECUTABLE} -m pip install 
--no-build-isolation --prefix=\$ENV{DESTDIR}${PY_INSTALL_PREFIX} 
${CMAKE_CURRENT_BINARY_DIR}/build/lensfun-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}-py3-none-any.whl)")
+
+ENDIF()
Index: lensfun-0.3.4/apps/pyproject.toml.in
===================================================================
--- /dev/null
+++ lensfun-0.3.4/apps/pyproject.toml.in
@@ -0,0 +1,10 @@
+[build-system]
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "lensfun"
+version= "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}"
+
+[tool.setuptools]
+packages = ["lensfun"]
Index: lensfun-0.3.4/apps/setup.py.in
===================================================================
--- lensfun-0.3.4.orig/apps/setup.py.in
+++ lensfun-0.3.4/apps/setup.py.in
@@ -8,5 +8,4 @@ from setuptools import setup
 
 setup(name="lensfun",
       version="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}",
-      package_dir={"": "${CMAKE_CURRENT_BINARY_DIR}"},
       packages=["lensfun"])

Reply via email to