| 5f022c63 | 29-Mar-2021 |
Alexei Colin <acolin@isi.edu> |
petsc4py: build against the PETSc being built
Fixes Issue 862:
./configure --with-petsc4py=1 && make && make install DESTDIR=foo <error>
Prior to this patch, when the Python extension is b
petsc4py: build against the PETSc being built
Fixes Issue 862:
./configure --with-petsc4py=1 && make && make install DESTDIR=foo <error>
Prior to this patch, when the Python extension is built against the PETSc installed in the system, i.e. PETSc needs to be fully installed before the extension can be built. This is a problem for packaging recipes that want to use `--with-petsc4py=1` but won't have PETSc installed into the system at the time the one single top-level build gets to building the Python extension.
This patch allows petsc4py to be built against PETSc located in the staging directory (DESTDIR). This involves four actions:
1. set PETSC_DIR the DESTDIR/PREFIX
2. but still pass DESTDIR to petsc4py build code (for items 3, 4)
3. input paths read from PETSc config files point into the final installation location of PETSc, so need to be prepended with DESTDIR
4. output paths to be used after installation need to be stripped of DESTDIR (they contain DESTDIR because of item 1)
NOTE: DESTDIR passed to the top-level makefile must be an absolute path. A relative path would not resolve intuitively at the time of building petsc4py, since the working directory would be `src/binding/petsc4py`.
Signed-off-by: Alexei Colin <acolin@isi.edu>
show more ...
|