From 3b50336b27ee1305cbd58090b9f954a434be0339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 30 Oct 2023 12:36:41 +0100 Subject: [PATCH] Remove pregenerated Cython C sources in %build In a future version of mock, %prep will only run once, which breaks the prior state of this package. Previously, this only worked because each %prep round restored the pregenerated files for the setup.py logic to see. However, when %prep only runs once, the second round of %pyproject_buildrequires fails unless Cython is already installed, which is not the default case, as the dependency has not yet been generated. See https://github.com/rpm-software-management/mock/pull/1250 --- python-lxml.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python-lxml.spec b/python-lxml.spec index c25bc4d..7b713b0 100644 --- a/python-lxml.spec +++ b/python-lxml.spec @@ -1,6 +1,6 @@ Name: python-lxml Version: 4.9.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: XML processing library combining libxml2/libxslt with the ElementTree API # The lxml project is licensed under BSD-3-Clause @@ -75,12 +75,12 @@ Python 3 version. %generate_buildrequires %pyproject_buildrequires -x source%{?with_extras:,cssselect,html5,htmlsoup} + +%build # Remove pregenerated Cython C sources # We need to do this after %%pyproject_buildrequires because setup.py errors # without Cython and without the .c files. find -type f -name '*.c' -print -delete >&2 - -%build export WITH_CYTHON=true %pyproject_wheel @@ -100,6 +100,9 @@ cp -a build/lib.%{python3_platform}-*/* src/ %doc README.rst %changelog +* Mon Oct 30 2023 Miro Hrončok - 4.9.3-3 +- Fix build with a future mock version + * Fri Jul 28 2023 Miro Hrončok - 4.9.3-2 - Fix build with Cython 3