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

Satish Balay balay at mcs.anl.gov
Sun Mar 14 23:06:08 CDT 2021


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.

>>>>
$ python3 -m pip install docutils epydoc
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: docutils in /usr/lib/python3.9/site-packages (0.16)
Collecting epydoc
  Using cached epydoc-3.0.1.tar.gz (1.8 MB)
Building wheels for collected packages: epydoc
  Building wheel for epydoc (setup.py) ... done
  Created wheel for epydoc: filename=epydoc-3.0.1-py3-none-any.whl size=263123 sha256=003e3ba68fc90b43fec554873c0b75878cf02d9f03c5b63dd465acf3ec1351e6
  Stored in directory: /home/balay/.cache/pip/wheels/9c/b1/6d/3c2a87bd69d3844ea31496eba2509194f1c9ee2dc18d51ca14
Successfully built epydoc
Installing collected packages: epydoc
Successfully installed epydoc-3.0.1
<<<

The basic issue I had was the way the python check for 'docutils,epydoc' was done required me to install them with both python2 and python3 [as /usr/bin/python was v3 for me]

thanks,
Satish


More information about the petsc-dev mailing list