Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-python-poppler for openSUSE:Factory checked in at 2025-01-20 17:14:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-python-poppler (Old) and /work/SRC/openSUSE:Factory/.python-python-poppler.new.5589 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-poppler" Mon Jan 20 17:14:28 2025 rev:5 rq:1238866 version:0.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-python-poppler/python-python-poppler.changes 2023-08-23 14:59:54.486236200 +0200 +++ /work/SRC/openSUSE:Factory/.python-python-poppler.new.5589/python-python-poppler.changes 2025-01-20 17:15:03.615394111 +0100 @@ -1,0 +2,28 @@ +Mon Jan 20 01:36:18 UTC 2025 - Steve Kowalik <steven.kowa...@suse.com> + +- Add patch support-poppler-25.01.patch: + * Support Poppler 25.01 changes. + +------------------------------------------------------------------- +Mon Jan 13 01:28:43 UTC 2025 - Steve Kowalik <steven.kowa...@suse.com> + +- Update to 0.4.1: + * Fix non-pure build for meson-python + * Tested with Python 3.11 and Poppler 23.04.0 + * Minimal supported Python version is now 3.7 + * Tested with Python 3.11 and Poppler 23.03.0 + * Build system is now meson, and package is PEP-517 compliant + * Tested with Python 3.10 and Poppler 22.04.0 + * EmbeddedFile data() and checksum() now return bytes + * Bugfix: Fixed typos in EmbeddedFile.modification_date and + EmbeddedFile.is_valid + * Bugfix: Fixed typo in page.search + * Bugfix: Fix underscore position in two attributes of the Rotation Enum + * Bugfix: Reading pdf_version now requires unlocked document + * Bugfix: Ensure document was loaded before creating Document object +- Drop patch fix-image-argb.patch, no longer required. +- No longer use disabled service to update, we don't need to clean up + pybind11 sources, switch to the GitHub tarball to keep the testsuite. +- Refresh patch use-system-pybind11.patch to work with meson. + +------------------------------------------------------------------- Old: ---- _service _servicedata fix-image-argb.patch python-poppler-0.2.2.tar.xz New: ---- python-poppler-0.4.1.tar.gz support-poppler-25.01.patch BETA DEBUG BEGIN: Old: * Bugfix: Ensure document was loaded before creating Document object - Drop patch fix-image-argb.patch, no longer required. - No longer use disabled service to update, we don't need to clean up BETA DEBUG END: BETA DEBUG BEGIN: New: - Add patch support-poppler-25.01.patch: * Support Poppler 25.01 changes. BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-python-poppler.spec ++++++ --- /var/tmp/diff_new_pack.UlZVJ4/_old 2025-01-20 17:15:05.223460308 +0100 +++ /var/tmp/diff_new_pack.UlZVJ4/_new 2025-01-20 17:15:05.227460473 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-python-poppler # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2025 SUSE LLC # Copyright (c) 2020 LISA GmbH ,Bingen, Germany # # All modifications and additions to the file contributed by third parties @@ -17,28 +17,28 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 Name: python-python-poppler -Version: 0.2.2 +Version: 0.4.1 Release: 0 Summary: Python binding to the poppler-cpp library License: GPL-2.0-only -Group: Development/Libraries/Python URL: https://github.com/cbrunet/python-poppler -Source: python-poppler-%{version}.tar.xz -Patch: use-system-pybind11.patch -Patch1: fix-image-argb.patch -BuildRequires: %{python_module devel} +Source: https://github.com/cbrunet/python-poppler/archive/refs/tags/v%{version}.tar.gz#/python-poppler-%{version}.tar.gz +# PATCH-FEATURE-OPENSUSE Build against system pybind11 +Patch0: use-system-pybind11.patch +# PATCH-FIX-UPSTREAM gh#cbrunet/python-poppler#92 +Patch1: support-poppler-25.01.patch +BuildRequires: %{python_module devel >= 3.7} +BuildRequires: %{python_module meson-python} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pybind11-devel} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: c++_compiler -BuildRequires: cmake BuildRequires: fdupes +BuildRequires: ninja BuildRequires: pkg-config BuildRequires: python-rpm-macros -BuildRequires: python3 BuildRequires: pkgconfig(poppler) # some tests require this BuildRequires: poppler-data @@ -58,24 +58,22 @@ %prep %autosetup -p1 -n python-poppler-%version -sed -i -e "s/-j2/%{?_smp_mflags}/" setup.py +rm -rf subprojects %build export CXXFLAGS="%{optflags}" -%python_build --debug +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -# gh#cbrunet/python-poppler#39 -donttest="test_get_pdf_version_of_locked_document" -%pytest_arch tests -k "not ($donttest)" +%pytest_arch tests %files %{python_files} %license LICENSE.txt %doc README.md %{python_sitearch}/poppler -%{python_sitearch}/python_poppler-%{version}*-info +%{python_sitearch}/python_poppler-%{version}.dist-info ++++++ support-poppler-25.01.patch ++++++ >From 6cc307548a490ddaf2054ead00b8e354b494e5bc Mon Sep 17 00:00:00 2001 From: Bohumir Zamecnik <bohumir.zamec...@gmail.com> Date: Thu, 16 Jan 2025 16:52:41 +0700 Subject: [PATCH] Fix: Remove image.copy() argument in poppler 25.01 - from poppler changelog: "Remove rect parameter from image::copy, it was never implemented" --- src/cpp/image.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cpp/image.cpp b/src/cpp/image.cpp index 725359b..91131f4 100644 --- a/src/cpp/image.cpp +++ b/src/cpp/image.cpp @@ -102,7 +102,11 @@ PYBIND11_MODULE(image, m) .def(py::init<int, int, image::format_enum>(), py::arg("iwidth"), py::arg("iheight"), py::arg("iformat")) .def("bytes_per_row", &image::bytes_per_row) // .def("const_data", &image::const_data) +#if HAS_VERSION(25, 1) + .def("copy", &image::copy) +#else .def("copy", &image::copy, py::arg("rect") = rect()) +#endif .def("data", &data) .def("set_data", &set_data) .def("format", &image::format) ++++++ use-system-pybind11.patch ++++++ --- /var/tmp/diff_new_pack.UlZVJ4/_old 2025-01-20 17:15:05.263461955 +0100 +++ /var/tmp/diff_new_pack.UlZVJ4/_new 2025-01-20 17:15:05.263461955 +0100 @@ -1,42 +1,18 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 936467d..0f97a75 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -6,8 +6,8 @@ list(APPEND Targets "page_renderer" "page_transition") - list(APPEND Targets "embedded_file" "destination" "toc" "font") +Index: python-poppler-0.4.1/meson.build +=================================================================== +--- python-poppler-0.4.1.orig/meson.build ++++ python-poppler-0.4.1/meson.build +@@ -13,7 +13,10 @@ poppler_dep = dependency('poppler-cpp', + python_mod = import('python') + python3 = python_mod.find_installation('python3', pure: false) +-pybind11_proj = subproject('pybind11') +-pybind11_dep = pybind11_proj.get_variable('pybind11_dep') ++pybind11_config = find_program('pybind11-config') ++pybind11_config_ret = run_command(pybind11_config, ['--includes'], check: true) ++pybind11_dep = declare_dependency( ++ include_directories: [pybind11_config_ret.stdout().split('-I')[-1].strip()], ++) --# find_package(pybind11) --add_subdirectory(pybind11) -+find_package(pybind11) -+# add_subdirectory(pybind11) - - - find_package(PkgConfig REQUIRED) -diff --git a/setup.py b/setup.py -index c1ba5f6..34f6ac3 100644 ---- a/setup.py -+++ b/setup.py -@@ -43,6 +43,7 @@ class CMakeBuild(build_ext): - cmake_args = [ - "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir, - "-DPYTHON_EXECUTABLE=" + sys.executable, -+ "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON", - ] - - cfg = "Debug" if self.debug else "Release" -@@ -65,9 +66,13 @@ class CMakeBuild(build_ext): - ) - if not os.path.exists(self.build_temp): - os.makedirs(self.build_temp) -+ from pprint import pformat -+ print("Env: {}\n".format(pformat(env))) -+ print("Run: {} in {}\n".format(["cmake", ext.sourcedir] + cmake_args, self.build_temp)) - subprocess.check_call( - ["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env - ) -+ print("Run: {} in {}\n".format(["cmake", "--build", "."] + build_args, self.build_temp)) - subprocess.check_call( - ["cmake", "--build", "."] + build_args, cwd=self.build_temp - ) + subdir('src')