Release 3.19.4 | Fix Cython requirement

This commit is contained in:
Antonio Trande 2023-08-11 12:52:39 +02:00
parent ac5eaf392b
commit 9712cb8e3a
2 changed files with 24 additions and 0 deletions

View File

@ -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__', '')

View File

@ -298,6 +298,7 @@ Source1: https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc4py-%{version}
Source2: %{name}-PETSc_cython0.29.36.c Source2: %{name}-PETSc_cython0.29.36.c
Source3: %{name}-PETSc_cython0.29.36.h Source3: %{name}-PETSc_cython0.29.36.h
Source4: %{name}-PETSc_api_cython0.29.36.h Source4: %{name}-PETSc_api_cython0.29.36.h
Patch9: %{name}-3.19.4-fix_Cython_requirement.patch
## Remove rpath flags ## Remove rpath flags
Patch0: %{name}-3.11-no-rpath.patch 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 install -pm 644 %{SOURCE3} %{name}-%{version}/src/binding/petsc4py/src/PETSc.h
rm -f %{name}-%{version}/src/binding/petsc4py/src/PETSc_api.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 install -pm 644 %{SOURCE4} %{name}-%{version}/src/binding/petsc4py/src/PETSc_api.h
pushd %{name}-%{version}
%patch -P 9 -p1 -b .backup
popd
%endif %endif
# Remove pre-generated Cython files # Remove pre-generated Cython files