[Paraview] xdmf.py install is scanning my /usr recursively and try to bytecompile anything in .py

François Bissey f.r.bissey at massey.ac.nz
Tue Jun 15 06:07:28 EDT 2010


Hi,

A problem that I encountered while packaging paraview-3.8.0.
Here is a build log extract:
-- Installing: /media/anthill/portage/sci-
visualization/paraview-3.8.0/image/usr/lib/python2.6/site-
packages/Xdmf/__init__.py
-- Installing: /media/anthill/portage/sci-
visualization/paraview-3.8.0/image/usr/lib/python2.6/site-
packages/Xdmf/Xdmf.py
Listing /usr/ ...
Listing /usr/bin ...
Compiling /usr/bin/add_esri_column.py ...
Sorry [Errno 13] Permission denied: '/usr/bin/add_esri_column.pyc'
Compiling /usr/bin/build_pcs.py ...
Sorry [Errno 13] Permission denied: '/usr/bin/build_pcs.pyc'
<snip>
Listing /usr/i686-pc-linux-gnu ...
Listing /usr/i686-pc-linux-gnu/bin ...
Listing /usr/i686-pc-linux-gnu/binutils-bin ...
Listing /usr/i686-pc-linux-gnu/binutils-bin/2.20.1 ...
Listing /usr/i686-pc-linux-gnu/gcc-bin ...
Listing /usr/i686-pc-linux-gnu/gcc-bin/3.3 ...
Listing /usr/i686-pc-linux-gnu/gcc-bin/4.3.4 ...
Listing /usr/i686-pc-linux-gnu/gcc-bin/4.4.3 ...
Listing /usr/i686-pc-linux-gnu/lib ...
<snip>
Listing /usr/src/linux-2.6.32-gentoo-r7/virt/kvm ...
Listing /usr/tmp-vrooom ...
-- Installing: /media/anthill/portage/sci-
visualization/paraview-3.8.0/image/usr/lib/paraview-3.8/libXdmf.so

So two points: first it doesn't respect DESTDIR - in the end bytecompiling is
the responsibility of the package manager so I disabled that completely.

Second it all come from this bit in Utilities/Xdmf2/libsrc/CMakeList.txt 
(lines 505-507):
  # Compile Byte Code
  INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} 
${Xdmf_SOURCE_DIR}/CMake/CompileXdmfByteCode.py 
    ${CMAKE_INSTALL_PREFIX}/${XDMF_WRAP_PYTHON_INSTALL_PY_DIR})")

It turns out that we scan /usr which is CMAKE_INSTALL_PREFIX because
XDMF_WRAP_PYTHON_INSTALL_PY_DIR is never defined. I suspect the intent
was to define it earlier and to use it to set XDMF_WRAP_PYTHON_INSTALL_DIR
as we can see earlier in the same file (lines 472):
  SET(XDMF_WRAP_PYTHON_INSTALL_DIR 
${CMAKE_INSTALL_PREFIX}${XDMF_WRAP_PYTHON_INSTALL_DIR}/Xdmf)

Which I think may have been meant:
  SET(XDMF_WRAP_PYTHON_INSTALL_DIR 
${CMAKE_INSTALL_PREFIX}${XDMF_WRAP_PYTHON_INSTALL_PY_DIR}/Xdmf)

--------------
If we don't care about DESTDIR replacing  
${CMAKE_INSTALL_PREFIX}/${XDMF_WRAP_PYTHON_INSTALL_PY_DIR}
in line 507 by:
${XDMF_WRAP_PYTHON_INSTALL_DIR}
will look in the right place.

Francois


More information about the ParaView mailing list