From cf25d6d376fc95034decec02c2e1501f97ae4955 Mon Sep 17 00:00:00 2001 From: sagitter Date: Dec 21 2019 10:10:50 +0000 Subject: Rebuild for PETSc-3.11.3 --- diff --git a/.gitignore b/.gitignore index 27503b5..d5c1161 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /petsc4py-3.9.1.tar.gz /petsc4py-3.10.0.tar.gz /petsc4py-3.10.1.tar.gz +/petsc4py-3.11.0.tar.gz diff --git a/petsc4py-3.11.0-bug125.patch b/petsc4py-3.11.0-bug125.patch new file mode 100644 index 0000000..f66c31c --- /dev/null +++ b/petsc4py-3.11.0-bug125.patch @@ -0,0 +1,34 @@ +From 3fdca5e21da1373f61fa78e5e03fe6284d7461cb Mon Sep 17 00:00:00 2001 +From: Lisandro Dalcin +Date: Thu, 23 May 2019 15:07:37 +0300 +Subject: [PATCH] Remove ancient GC hackery + +--- + src/PETSc/cyclicgc.pxi | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/PETSc/cyclicgc.pxi b/src/PETSc/cyclicgc.pxi +index 89b73b8..eb51fc5 100644 +--- a/src/PETSc/cyclicgc.pxi ++++ b/src/PETSc/cyclicgc.pxi +@@ -14,9 +14,6 @@ cdef extern from "Python.h": + traverseproc tp_traverse + inquiry tp_clear + PyTypeObject *Py_TYPE(PyObject *) +- ctypedef struct PyGC_Head: +- Py_ssize_t gc_refs"gc.gc_refs" +- PyGC_Head *_Py_AS_GC(PyObject*) + + cdef int tp_traverse(PyObject *o, visitproc visit, void *arg): + ## printf("%s.tp_traverse(%p)\n", Py_TYPE(o).tp_name, o) +@@ -24,8 +21,6 @@ cdef int tp_traverse(PyObject *o, visitproc visit, void *arg): + if p == NULL: return 0 + cdef PyObject *d = p.python_context + if d == NULL: return 0 +- if arg == NULL and _Py_AS_GC(d).gc_refs == 0: +- _Py_AS_GC(d).gc_refs = 1 + return visit(d, arg) + + cdef int tp_clear(PyObject *o): +-- +2.10.5 diff --git a/petsc4py.spec b/petsc4py.spec index 1985f38..967bad5 100644 --- a/petsc4py.spec +++ b/petsc4py.spec @@ -21,12 +21,17 @@ %global with_mpich 1 %global with_openmpi 1 -%global petscver 3.10.0 +# Enable for Python-3.8 +%if 0%{?python3_version_nodots} == 38 +%global with_python38 1 +%endif + +%global petscver 3.11.0 %global pypi_name petsc4py Name: %{pypi_name} -Version: 3.10.1 -Release: 2%{?dist} +Version: 3.11.0 +Release: 6%{?dist} Summary: Python bindings for MPI PETSc License: BSD URL: https://bitbucket.org/petsc/%{pypi_name} @@ -35,6 +40,8 @@ Source0: https://bitbucket.org/petsc/%{pypi_name}/downloads/%{pypi_name}- # Set directories where MPI libraries are Patch0: %{name}-openmpi_set_dir.patch Patch1: %{name}-mpich_set_dir.patch +# https://bitbucket.org/petsc/petsc4py/issues/125/python-380-a4-error-pygc_head-aka-struct +Patch2: %{name}-%{version}-bug125.patch %if 0%{?with_python3_other} BuildRequires: python%{python3_other_pkgversion}-devel @@ -195,6 +202,12 @@ Python%{python3_other_pkgversion} bindings for MPICH PETSc. rm -rf %{pypi_name}-%{version}/%{pypi_name}.egg-info +%if 0%{?with_python38} +pushd %{pypi_name}-%{version} +%patch2 -p1 +popd +%endif + cp -a %{pypi_name}-%{version} %{pypi_name}-mpich mv %{pypi_name}-%{version} %{pypi_name}-openmpi @@ -238,6 +251,11 @@ export PETSC_DIR=%{_prefix} %py2_build %endif %if 0%{?with_python3} + +# regenerate the C sources (python 3.8) +%if 0%{?with_python38} +%{__python3} conf/cythonize.py +%endif %py3_build %if 0%{?with_python3_other} @@ -257,6 +275,11 @@ export PETSC_DIR=%{_prefix} %py2_build %endif %if 0%{?with_python3} + +# regenerate the C sources (python 3.8) +%if 0%{?with_python38} +%{__python3} conf/cythonize.py +%endif %py3_build %if 0%{?with_python3_other} @@ -396,8 +419,10 @@ export PYTHONPATH=$RPM_BUILD_ROOT$MPI_PYTHON2_SITEARCH MPI_PYTHON3_SITEARCH=%{python3_sitearch}/openmpi %endif +%if 0%{?fedora} < 31 export PYTHONPATH=$RPM_BUILD_ROOT$MPI_PYTHON3_SITEARCH %{__python3} setup.py test +%endif %if 0%{?with_python3_other} export PYTHONPATH=$RPM_BUILD_ROOT%{python3_other_sitearch}/openmpi @@ -426,7 +451,6 @@ export PYTHONPATH=$RPM_BUILD_ROOT$MPI_PYTHON2_SITEARCH %if 0%{?rhel} MPI_PYTHON3_SITEARCH=%{python3_sitearch}/mpich %endif - export PYTHONPATH=$RPM_BUILD_ROOT$MPI_PYTHON3_SITEARCH %{__python3} setup.py test @@ -498,8 +522,26 @@ popd %endif %changelog -* Tue Feb 05 2019 Antonio Trande - 3.10.1-2 -- Rebuild for Sundials 4.1.0 +* Fri Jul 26 2019 Fedora Release Engineering - 3.11.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jun 27 2019 Antonio Trande - 3.11.0-5 +- Rebuild for petsc-3.11.3 + +* Fri May 24 2019 Antonio Trande - 3.11.0-4 +- Use conditional macro for the patch #2 + +* Fri May 24 2019 Antonio Trande - 3.11.0-3 +- Patched for Python-3.8 + +* Thu May 23 2019 Antonio Trande - 3.11.0-2 +- Rebuild for OpenMPI-4 + +* Mon Apr 15 2019 Antonio Trande - 3.11.0-1 +- Release 3.11.0 + +* Mon Mar 18 2019 Orion Poplawski - 3.10.1-2 +- Rebuild for hdf5 1.10.5 * Tue Feb 05 2019 Antonio Trande - 3.10.1-1 - Update to 3.10.1 diff --git a/sources b/sources index 08ff6c1..c0d8b6a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (petsc4py-3.10.1.tar.gz) = 75104e92c000cc133c91741a91a6faeff389fd21317a4a02afb40a2357995938eac69ab151ab03ae82bcdfc8533c5f58ca645061180f7ff622e32a52042f3f8f +SHA512 (petsc4py-3.11.0.tar.gz) = 66ebdef4ca682184304e7e842d3b3dd954f6c9fe7727d5f424cf1d925a62361a3eaac6e4241f285b4a82b19586d121d3fcb050e7b6161dfdee84ba347a427dfb