[petsc-dev] integrate petsc4py tarball generation with petsc tarball generation

Barry Smith bsmith at petsc.dev
Mon Mar 15 10:57:09 CDT 2021


     I think some of the python documentation tools used, epydoc, require that the python package it is documenting exists and is run-able since it probably uses the self-documenting features of Python.  This makes perfect sense for Python. A python package cannot provide help messages unless you can import it. 


  Maybe it could be rigged that petsc4py would allow itself to be imported and produce help messages without loading the PETSc libraries, this would require digging around a bit in how petsc4py loads the PETSc dynamic library.

> On Mar 15, 2021, at 10:42 AM, Satish Balay via petsc-dev <petsc-dev at mcs.anl.gov> wrote:
> On Mon, 15 Mar 2021, Satish Balay wrote:
>>> 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?
> Is it required to build PETSc library - to build petsc4py tarball?
> Satish
> -----
> balay at sb /home/balay/tmp/petsc/src/binding/petsc4py (main=)
> $ make sdist
> python setup.py build_src 
> running build_src
> cythonizing 'petsc4py.PETSc.pyx' -> 'petsc4py.PETSc.c'
> cythonizing 'libpetsc4py/libpetsc4py.pyx' -> 'libpetsc4py/libpetsc4py.c'
> /usr/bin/rst2html --input-encoding=utf-8 --no-compact-lists --cloak-email-addresses ./LICENSE.rst  > docs/LICENSE.html
> /usr/bin/rst2html --input-encoding=utf-8 --no-compact-lists --cloak-email-addresses ./CHANGES.rst  > docs/CHANGES.html
> /usr/bin/rst2html --input-encoding=utf-8 --no-compact-lists --cloak-email-addresses docs/index.rst > docs/index.html
> mkdir -p build/doctrees docs/usrman
> sphinx-build -b html -d build/doctrees  \
> docs/source docs/usrman
> Running Sphinx v3.2.1
> building [mo]: targets for 0 po files that are out of date
> building [html]: targets for 6 source files that are out of date
> updating environment: [new config] 6 added, 0 changed, 0 removed
> reading sources... [100%] tutorial                                                                                                                                              
> looking for now-outdated files... none found
> pickling environment... done
> checking consistency... /home/balay/tmp/petsc/src/binding/petsc4py/docs/source/manual.rst: WARNING: document isn't included in any toctree
> done
> preparing documents... done
> writing output... [100%] tutorial                                                                                                                                               
> generating indices...  genindexdone
> writing additional pages...  searchdone
> copying static files... ... done
> copying extra files... done
> dumping search index in English (code: en)... done
> dumping object inventory... done
> build succeeded, 1 warning.
> The HTML pages are in docs/usrman.
> rm -f docs/usrman/.buildinfo
> 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: *** [makefile:110: epydoc-html] Error 1

More information about the petsc-dev mailing list