From 8f2b50f0c553f762f173aa6bb908ec425078738d Mon Sep 17 00:00:00 2001 From: František Zatloukal Date: Jul 13 2023 14:45:36 +0000 Subject: Backport upstream switch from distutils to setuptools --- diff --git a/599.patch b/599.patch new file mode 100644 index 0000000..eb89626 --- /dev/null +++ b/599.patch @@ -0,0 +1,26 @@ +From 1f7e763e224ab1030e8d6319c092923dc44fb19f Mon Sep 17 00:00:00 2001 +From: Tzu-ping Chung +Date: Tue, 26 Jan 2021 16:21:10 +0800 +Subject: [PATCH] Use setuptools instead of distutils + +This allows the project to make use of modern Python packaging +features such as wheels, isolated builds, and more. + +The change is also going to be necessary soon; distutils will soon +be deprecated in 3.10, and removed from the standard library in 3.12. +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 9e16ec8ab..8ac671511 100644 +--- a/setup.py ++++ b/setup.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env python + +-from distutils.core import setup ++from setuptools import setup + import re + + long_description = """ diff --git a/python-PyPDF2.spec b/python-PyPDF2.spec index ee87fb2..30cd21f 100644 --- a/python-PyPDF2.spec +++ b/python-PyPDF2.spec @@ -3,12 +3,16 @@ Name: python-%{srcname} Version: 1.26.0 -Release: 23%{?dist} +Release: 24%{?dist} License: BSD Summary: %{sum} Source: https://pypi.python.org/packages/source/P/%{srcname}/%{srcname}-%{version}.tar.gz URL: https://github.com/mstamy2/PyPDF2 +# setuptools instead of distutils +# https://github.com/py-pdf/pypdf/pull/599 +Patch01: 599.patch + BuildArch: noarch @@ -30,6 +34,7 @@ It is therefore a useful tool for websites that manage or manipulate PDFs. %package -n python3-%{srcname} Summary: %{sum} BuildRequires: python3-devel +BuildRequires: python3-setuptools %{?python_provide:%python_provide python3-%{srcname}} @@ -86,6 +91,9 @@ chmod a-x Scripts/* Sample_Code/* LICENSE README.md CHANGELOG %license LICENSE %changelog +* Thu Jul 13 2023 František Zatloukal - 1.26.0-24 +- Backport upstream switch from distutils to setuptools (Fixes RHBZ#2155032) + * Tue Jun 13 2023 Python Maint - 1.26.0-23 - Rebuilt for Python 3.12