From 9712cb8e3ad6721de4e1a1efd21c53f2033c3fd7 Mon Sep 17 00:00:00 2001 From: Antonio Trande Date: Fri, 11 Aug 2023 12:52:39 +0200 Subject: [PATCH] Release 3.19.4 | Fix Cython requirement --- petsc-3.19.4-fix_Cython_requirement.patch | 20 ++++++++++++++++++++ petsc.spec | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 petsc-3.19.4-fix_Cython_requirement.patch diff --git a/petsc-3.19.4-fix_Cython_requirement.patch b/petsc-3.19.4-fix_Cython_requirement.patch new file mode 100644 index 0000000..fd07eab --- /dev/null +++ b/petsc-3.19.4-fix_Cython_requirement.patch @@ -0,0 +1,20 @@ +--- a/conf/confpetsc.orig.py 2023-07-31 17:00:55.000000000 +0200 ++++ b/conf/confpetsc.py 2023-08-11 12:45:52.386371527 +0200 +@@ -100,7 +100,7 @@ + return False + REQUIRED = Version(VERSION) + PROVIDED = Version(m.groups()[0]) +- if PROVIDED != REQUIRED: ++ if PROVIDED < REQUIRED: + warn("You need Cython == {0} (you have version {1})" + .format(VERSION, CYTHON_VERSION)) + return False +@@ -130,7 +130,7 @@ + return + finally: + os.chdir(cwd) +- require = 'Cython == %s' % VERSION ++ require = 'Cython >= 0.29.36' + if setuptools and not cython_chk(VERSION, verbose=False): + if sys.modules.get('Cython'): + removed = getattr(sys.modules['Cython'], '__version__', '') diff --git a/petsc.spec b/petsc.spec index a58f4c7..9dfc487 100644 --- a/petsc.spec +++ b/petsc.spec @@ -298,6 +298,7 @@ Source1: https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc4py-%{version} Source2: %{name}-PETSc_cython0.29.36.c Source3: %{name}-PETSc_cython0.29.36.h Source4: %{name}-PETSc_api_cython0.29.36.h +Patch9: %{name}-3.19.4-fix_Cython_requirement.patch ## Remove rpath flags Patch0: %{name}-3.11-no-rpath.patch @@ -584,6 +585,9 @@ rm -f %{name}-%{version}/src/binding/petsc4py/src/PETSc.h install -pm 644 %{SOURCE3} %{name}-%{version}/src/binding/petsc4py/src/PETSc.h rm -f %{name}-%{version}/src/binding/petsc4py/src/PETSc_api.h install -pm 644 %{SOURCE4} %{name}-%{version}/src/binding/petsc4py/src/PETSc_api.h +pushd %{name}-%{version} +%patch -P 9 -p1 -b .backup +popd %endif # Remove pre-generated Cython files