On Mon, 15 Mar 2021, Lisandro Dalcin wrote:On Mon, 15 Mar 2021 at 07:06, Satish Balay <balay@mcs.anl.gov> wrote:
Lisandro,
For the upcoming release its best to update lib/petsc/bin/maint/builddist
to also build petsc4py tarball in sync with petsc tarball.
What is the current process to generate petsc4py tarball?
BTW: I stumbled into a couple of issues with building petsc4py docs
1. the docs build process requires petsc library to be built?
python setup.py build_src
running build_src
cythonizing 'petsc4py.PETSc.pyx' -> 'petsc4py.PETSc.c'
cythonizing 'libpetsc4py/libpetsc4py.pyx' -> 'libpetsc4py/libpetsc4py.c'
mkdir -p docs/apiref
env CFLAGS=-O0 python2 setup.py -q build --build-lib build/lib.py2
/usr/bin/ld: cannot find -lpetsc
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
make[2]: *** [makefile:110: epydoc-html] Error 1
gmake[1]: [makefile:422: sphinx-docs-all] Error 2 (ignored)
<<<
2. Any particular reason it needs python2? I see it requires
docutils,epydoc - but I see python3 is able to install them.
It requires petsc4py to be installed in Python 2, such that epydoc can
build the API reference.
But epydoc can be installed with python3. So this is more of petsc4py code that uses epydoc - than epydoc code?I have not found a nice replacement for epydoc-generated documentation.
If Python 2 is an annoyance, then just remove, comment-out anything related
to epydoc in "makefile"
Well I can work around it. [by installing both python2 and python3 versions of epydoc via pip]However its not clear to me where the python2 requirement is comingfrom - and if things can be unified using python3A related issue: I think Patrick is working on migrating some of thepetsc4py docs to sphynx. And curently sphynx is installed in python3virt-env [so now we need it for both python3 for petsc side, andpython2 for petsc4py side]
I haven't dug into the petsc4py docs yet, but I was very much hoping that we could at least make all the docs build at once and be deployed to the same URL, even if for now they are building with an assortment of tools. (We could include the petsc4py docs, for now, as we're doing with the HTML man pages and sources from c2html, specifying them as "extra html" with Sphinx) . As Satish says, it'd be nice to do this with the same Python environment we use to build the Sphinx docs - I would naively hope/assume that since epydoc exists for python3 and petsc4py works with python3, it would be possible.