Release 3.19.4 | Exclude removing pre-generated Cython files

This commit is contained in:
Antonio Trande 2023-08-11 12:14:41 +02:00
parent 7ca294be74
commit ac5eaf392b

View File

@ -492,11 +492,7 @@ BuildRequires: hdf5-mpich-devel
BuildRequires: scalapack-mpich-devel
BuildRequires: ptscotch-mpich-devel
BuildRequires: python3-numpy
%if 0%{?rhel} || 0%{?fedora} < 39
BuildRequires: python3-Cython
%else
BuildRequires: python3-pip
%endif
Requires: petsc-mpich%{?_isa}
Requires: hdf5-mpich%{?_isa}
Requires: scalapack-openmpi%{?_isa}
@ -580,7 +576,8 @@ cp -a petsc4py-%{version}/* %{name}-%{version}/
rm -rf %{name}-%{version}/*.egg-info
rm -rf petsc4py-%{version}
%if 0%{?fedora} > 37
# Use pre-generated Cython files
%if 0%{?fedora} > 38
rm -f %{name}-%{version}/src/binding/petsc4py/src/PETSc.c
install -pm 644 %{SOURCE2} %{name}-%{version}/src/binding/petsc4py/src/PETSc.c
rm -f %{name}-%{version}/src/binding/petsc4py/src/PETSc.h
@ -589,6 +586,9 @@ rm -f %{name}-%{version}/src/binding/petsc4py/src/PETSc_api.h
install -pm 644 %{SOURCE4} %{name}-%{version}/src/binding/petsc4py/src/PETSc_api.h
%endif
# Remove pre-generated Cython files
#rm $(grep -rl '/\* Generated by Cython')
%if 0%{?fedora}
for i in `find . -name 'setup.py' -o -name 'configure' -o -name '*.py'`; do
%py3_shebang_fix $i
@ -605,11 +605,6 @@ pushd %{name}-%{version}
%endif
popd
# Remove pregenerated Cython C sources
pushd %{name}-%{version}
rm $(grep -rl '/\* Generated by Cython')
popd
%if %{with arch64}
cp -a %{name}-%{version} build64
pushd build64