1
0
forked from pool/pdfarranger

1 Commits

Author SHA256 Message Date
c823ef588e Add python313.patch
Add python313.patch to fix compatibility with python313
boo#1257190, gh#pdfarranger/pdfarranger#1238
2026-02-03 07:55:52 +01:00
6 changed files with 57 additions and 85 deletions

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7cda866a62b42a23dafb409985e674a595d243037f04c80fdc39d7bb24f43374
size 455095

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:03c3a1b207748556f0cbc07e69aa8bba0924ce38343cb9815860b90649bb6875
size 607484

View File

@@ -1,39 +1,8 @@
-------------------------------------------------------------------
Thu Jul 3 06:22:39 UTC 2025 - Atri Bhattacharya <badshah400@gmai.com>
Tue Feb 3 06:53:51 UTC 2026 - Daniel Garcia <daniel.garcia@suse.com>
- Specfile cleanups:
* Drop 'Requires: gtk3': There is no package called 'gtk3', and
the right gtk3 shared library is already pulled in by
typelib-1_0-Gtk-3_0.
* Add pdfarranger.rpmlintrc to weed out obvious false positives.
* Use pyproject macros to build and install; add python-pip and
python-wheel as BuildRequires.
* Add BuildRequires: hicolor-icon-theme for correct ownership of
%_datadir/icon/hicolor dir.
* Drop obsolete %suse_update_desktop_file macro and associated
BuildRequires: update-desktop-files.
* Implement %check section using pytest; add required packages
to BuildRequires for tests.
* Drop info not directly relevant to application use from
package description.
- Add 'Requires: python-packaging': new version has 'imports' on
it.
-------------------------------------------------------------------
Thu Jul 3 06:13:12 UTC 2025 - Christophe Marin <christophe@krop.fr>
- Update to 1.12.1
* Fix incompatibility with Python 3.13.4 on Linux
* Update translations
* Support export to png, jpeg and rasterized pdf
* Fix import of webp images on Windows and Flatpak installations
* Fix priority of what metadata is saved when merging documents
* Fix printing of rasterized pdf
-------------------------------------------------------------------
Wed Feb 19 13:37:26 UTC 2025 - ecsos <ecsos@opensuse.org>
- Use pythons so we can build also for Leap with python311.
- Add python313.patch to fix compatibility with python313
boo#1257190, gh#pdfarranger/pdfarranger#1238
-------------------------------------------------------------------
Thu Oct 17 09:06:21 UTC 2024 - Christophe Marin <christophe@krop.fr>

View File

@@ -1,7 +0,0 @@
# These are absolutely necessary, though not listed in setup.py dependencies
addFilter("pdfarranger.noarch: W: python-leftover-require python3-cairo")
addFilter("pdfarranger.noarch: W: python-leftover-require python3-dateutil")
addFilter("pdfarranger.noarch: W: python-leftover-require python3-gobject-Gdk")
# This is already there as %%{python_flavor}-dateutil
addFilter("pdfarranger.noarch: W: python-missing-require python-dateutil")

View File

@@ -1,7 +1,7 @@
#
# spec file for package pdfarranger
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2020 Karl Cheng <qantas94heavy@gmail.com>
#
# All modifications and additions to the file contributed by third parties
@@ -17,46 +17,29 @@
#
%if 0%{?suse_version} >= 1600
%define pythons python3
%else
%define pythons python311
%endif
Name: pdfarranger
Version: 1.12.1
Version: 1.11.1
Release: 0
Summary: Merge, split, rotate, crop, and rearrange pages of PDF documents
License: GPL-3.0-only
URL: https://github.com/pdfarranger/pdfarranger
Source0: https://github.com/pdfarranger/pdfarranger/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}.rpmlintrc
BuildRequires: %{python_module base}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
Source: https://github.com/pdfarranger/pdfarranger/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM python313.patch gh#pdfarranger/pdfarranger@681fa51a2a20
Patch0: python313.patch
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
BuildRequires: intltool
BuildRequires: python-rpm-macros
# Section Tests
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module cairo}
BuildRequires: %{python_module dateutil >= 2.4.0}
BuildRequires: %{python_module gobject-Gdk}
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pikepdf >= 6}
BuildRequires: typelib-1_0-Gtk-3_0
BuildRequires: typelib-1_0-Poppler-0_18
# /Section
Requires: %{python_flavor}-cairo
Requires: %{python_flavor}-dateutil >= 2.4.0
Requires: %{python_flavor}-gobject-Gdk
Requires: %{python_flavor}-packaging
Requires: %{python_flavor}-pikepdf >= 6
BuildRequires: python3-devel
BuildRequires: python3-rpm-macros
BuildRequires: python3-setuptools
BuildRequires: update-desktop-files
Requires: gtk3
Requires: python3-cairo
Requires: python3-dateutil >= 2.4.0
Requires: python3-gobject-Gdk
Requires: python3-pikepdf >= 6
Requires: typelib-1_0-Gtk-3_0
Requires: typelib-1_0-Poppler-0_18
Recommends: %{python_flavor}-img2pdf >= 0.3.4
Recommends: python3-img2pdf >= 0.3.4
BuildArch: noarch
%description
@@ -64,32 +47,33 @@ pdfarranger is a small python-gtk application, which helps the user
to merge or split pdf documents and rotate, crop and rearrange their
pages using a graphical interface. It is a frontend for pikepdf.
pdfarranger is a fork of Konstantinos Poulioss pdfshuffler. It is
a humble attempt to make the project a bit more active.
%lang_package
%prep
%autosetup -p1
%build
%pyproject_wheel
python3 setup.py build
%install
%pyproject_install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
%suse_update_desktop_file -r com.github.jeromerobert.pdfarranger Graphics VectorGraphics
%find_lang %{name} %{?no_lang_C}
%fdupes -s %{buildroot}
%check
%pytest
%files
%license COPYING
%doc README.md
%{_bindir}/%{name}
%{python_sitelib}/%{name}
%{python_sitelib}/%{name}-%{version}*.*-info
%{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info
%{_datadir}/applications/com.github.jeromerobert.pdfarranger.desktop
%{_mandir}/man1/%{name}.1%{?ext_man}
%{_datadir}/%{name}/
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/%{name}
%{_datadir}/icons/hicolor
%{_datadir}/metainfo/com.github.jeromerobert.pdfarranger.metainfo.xml
%files lang -f %{name}.lang

26
python313.patch Normal file
View File

@@ -0,0 +1,26 @@
From 681fa51a2a20b13b4c77cc11a6007f99bf8da1e0 Mon Sep 17 00:00:00 2001
From: David Auer <dreua@posteo.de>
Date: Tue, 10 Jun 2025 01:14:30 +0200
Subject: [PATCH] Fix incompatibility with Python 3.13.4
---
pdfarranger/pdfarranger.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pdfarranger/pdfarranger.py b/pdfarranger/pdfarranger.py
index 631e19d94..07d90ab4c 100644
--- a/pdfarranger/pdfarranger.py
+++ b/pdfarranger/pdfarranger.py
@@ -41,11 +41,11 @@
from functools import lru_cache
from math import log
-multiprocessing.freeze_support() # Does nothing in Linux
sharedir = os.path.join(sys.prefix, 'share')
basedir = '.'
if getattr(sys, 'frozen', False):
+ multiprocessing.freeze_support()
basedir = os.path.dirname(sys.executable)
sharedir = os.path.join(basedir, 'share')
elif sys.argv[0]: