[petsc-dev] integrate petsc4py tarball generation with petsc tarball generation
Satish Balay
balay at mcs.anl.gov
Mon Mar 15 10:26:28 CDT 2021
On Mon, 15 Mar 2021, Lisandro Dalcin wrote:
> On Mon, 15 Mar 2021 at 07:06, Satish Balay <balay at 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 coming
from - and if things can be unified using python3
A related issue: I think Patrick is working on migrating some of the
petsc4py docs to sphynx. And curently sphynx is installed in python3
virt-env [so now we need it for both python3 for petsc side, and
python2 for petsc4py side]
> and run "make sdist".
Ah - ok. Will check this to see if I can generate the tarball in sync
with petsc tarball. What source files need updating for
release/version info?
> But this way the tarball will miss the API reference.
> PS: All this could be converted to a script that installs petsc4py and
> epydoc in a Python 2 virtual environment, and next users another venv for
> the Python 3 Sphinx stuff.
One issue: Fedora-33 does not have 'python2-pip' anymore. I was able
to manually install it. However this might become an issue for others
who want to build docs [even if we automate the docs build to
install/use pyton2-venv]
Satish
More information about the petsc-dev
mailing list