Control: tags -1 + patch Hello,
The python(2) bindings can simply be removed to get rid of the python(2) dependency. There was also a compile issue with PyBuffer_FromMemory which apparently is no longer available. According to google knowledge it should be replaced by PyMemoryView_FromMemory in newer python versions so a patch was added to handle that. Debdiff attached. Regards, Andreas Henriksson
diff -Nru xdmf-3.0+git20160803/debian/changelog xdmf-3.0+git20160803/debian/changelog --- xdmf-3.0+git20160803/debian/changelog 2018-11-20 11:57:51.000000000 +0100 +++ xdmf-3.0+git20160803/debian/changelog 2019-09-06 22:30:49.000000000 +0200 @@ -1,3 +1,13 @@ +xdmf (3.0+git20160803-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Drop python-xdmf because of python2 removal (Closes: #938842) + * Add debian/patches/pybuffer-frommemory.patch + - PyBuffer_FromMemory is gone and needs to be replaced with + PyMemoryView_FromMemory in newer python. + + -- Andreas Henriksson <[email protected]> Fri, 06 Sep 2019 22:30:49 +0200 + xdmf (3.0+git20160803-5) unstable; urgency=medium * Drop ancient X-Python depends on 3.4+, 2.7 diff -Nru xdmf-3.0+git20160803/debian/control xdmf-3.0+git20160803/debian/control --- xdmf-3.0+git20160803/debian/control 2018-11-20 11:57:51.000000000 +0100 +++ xdmf-3.0+git20160803/debian/control 2019-09-06 22:28:39.000000000 +0200 @@ -5,7 +5,7 @@ Build-Depends: debhelper (>= 10), cmake(>= 2.4.0), libhdf5-dev, libhdf5-mpi-dev, libxml2-dev, libboost-dev, - python-dev, dh-python, python3-dev, + dh-python, python3-dev, gfortran, swig, bzip2, libbz2-dev, libgzstream-dev, @@ -47,13 +47,6 @@ This package contains the headers and development tools needed to build against the Xdmf libraries. -Package: python-xdmf -Section: python -Architecture: any -Depends: libxdmf3 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}, ${python2:Depends} -Description: Python wrappers for the eXtensible Data Model and Format library - This package provides python wrappers for the libXDMF library. - Package: python3-xdmf Section: python Architecture: any diff -Nru xdmf-3.0+git20160803/debian/patches/pybuffer-frommemory.patch xdmf-3.0+git20160803/debian/patches/pybuffer-frommemory.patch --- xdmf-3.0+git20160803/debian/patches/pybuffer-frommemory.patch 1970-01-01 01:00:00.000000000 +0100 +++ xdmf-3.0+git20160803/debian/patches/pybuffer-frommemory.patch 2019-09-06 22:30:49.000000000 +0200 @@ -0,0 +1,11 @@ +--- a/core/XdmfCore.i ++++ b/core/XdmfCore.i +@@ -565,7 +565,7 @@ + void *vp = $self->getValuesInternal(); + Py_ssize_t sz = + $self->getSize() * $self->getArrayType()->getElementSize(); +- PyObject * c = PyBuffer_FromMemory(vp, sz); ++ PyObject * c = PyMemoryView_FromMemory(reinterpret_cast<char *>(vp), sz, PyBUF_READ); + return(c); + } + diff -Nru xdmf-3.0+git20160803/debian/patches/series xdmf-3.0+git20160803/debian/patches/series --- xdmf-3.0+git20160803/debian/patches/series 2016-12-07 13:52:23.000000000 +0100 +++ xdmf-3.0+git20160803/debian/patches/series 2019-09-06 22:30:49.000000000 +0200 @@ -8,3 +8,4 @@ python3.patch exodus.patch hdf5-1.10.patch +pybuffer-frommemory.patch diff -Nru xdmf-3.0+git20160803/debian/python-xdmf.install xdmf-3.0+git20160803/debian/python-xdmf.install --- xdmf-3.0+git20160803/debian/python-xdmf.install 2016-12-07 13:52:23.000000000 +0100 +++ xdmf-3.0+git20160803/debian/python-xdmf.install 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -usr/lib/python2.7 diff -Nru xdmf-3.0+git20160803/debian/rules xdmf-3.0+git20160803/debian/rules --- xdmf-3.0+git20160803/debian/rules 2017-05-18 10:13:33.000000000 +0200 +++ xdmf-3.0+git20160803/debian/rules 2019-09-06 22:30:49.000000000 +0200 @@ -5,7 +5,7 @@ # The magic debhelper rule: %: - dh $@ --buildsystem cmake --with python2,python3 + dh $@ --buildsystem cmake --with python3 include /usr/share/mpi-default-dev/debian_defaults MPI:=$(ARCH_DEFAULT_MPI_IMPL) @@ -13,12 +13,11 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) TMPDIR=$(CURDIR)/debian/tmp LIBDIR=/usr/lib/${DEB_HOST_MULTIARCH} -PY2:=$(shell pyversions -d) PY3:=$(shell py3versions -d)m CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) -fPIC -BUILD_DIRS:= debian/build-mpi-py2 debian/build-serial-py2 debian/build-mpi-py3 debian/build-serial-py3 +BUILD_DIRS:= debian/build-mpi-py3 debian/build-serial-py3 CMAKE_FLAGS:= -DXDMF_SYSTEM_ZLIB=ON -DXDMF_SYSTEM_LIBXML2=ON -DXDMF_USE_BZIP2=ON -DXDMF_USE_GZIP=ON \ -DXDMF_SYSTEM_HDF5=ON \ @@ -32,13 +31,6 @@ override_dh_auto_configure: mkdir -p $(BUILD_DIRS) - (cd debian/build-serial-py2 && \ - HDF5_ROOT=$(LIBDIR)/hdf5/serial cmake ../.. \ - $(CMAKE_FLAGS) \ - -DPYTHON_INCLUDE_PATH=/usr/include/$(PY2) \ - -DPYTHON_LIBRARY=$(LIBDIR)/lib$(PY2).so \ - -DXDMF_BUILD_MPI=OFF -DXDMF_SYSTEM_HDF5_IS_PARALLEL=OFF \ - -DHDF5_ROOT=$(LIBDIR)/hdf5/serial ) (cd debian/build-serial-py3 && \ HDF5_ROOT=$(LIBDIR)/hdf5/serial cmake ../.. \ $(CMAKE_FLAGS) \ @@ -46,13 +38,6 @@ -DPYTHON_LIBRARY=$(LIBDIR)/lib$(PY3).so \ -DXDMF_BUILD_MPI=OFF -DXDMF_SYSTEM_HDF5_IS_PARALLEL=OFF \ -DHDF5_ROOT=$(LIBDIR)/hdf5/serial ) - (cd debian/build-mpi-py2 && \ - HDF5_ROOT=$(LIBDIR)/hdf5/$(MPI) cmake ../.. \ - $(CMAKE_FLAGS) \ - -DPYTHON_INCLUDE_PATH=/usr/include/$(PY2) \ - -DPYTHON_LIBRARY=$(LIBDIR)/lib$(PY2).so \ - -DXDMF_BUILD_MPI=ON -DXDMF_SYSTEM_HDF5_IS_PARALLEL=ON \ - -DHDF5_ROOT=$(LIBDIR)/hdf5/$(MPI) ) (cd debian/build-mpi-py3 && \ HDF5_ROOT=$(LIBDIR)/hdf5/$(MPI) cmake ../.. \ $(CMAKE_FLAGS) \ @@ -75,15 +60,12 @@ # Assemble something workable from the 4 install dirs. $(MAKE) -C debian/build-mpi-py3 install DESTDIR=$(TMPDIR) # Add the (non-default) serial cases into a NoMpi subdirectory - mkdir -p $(TMPDIR)/usr/lib/$(PY3)/xdmf/NoMpi $(TMPDIR)/usr/lib/$(PY2)/xdmf/NoMpi + mkdir -p $(TMPDIR)/usr/lib/$(PY3)/xdmf/NoMpi # standard shared libs into {serial,$MPI} directories as elswehere mkdir -p $(TMPDIR)/$(LIBDIR)/xdmf/serial $(TMPDIR)/$(LIBDIR)/xdmf/$(MPI) mv $(TMPDIR)/usr/lib/lib* $(TMPDIR)/$(LIBDIR)/xdmf/$(MPI) cp debian/build-serial-py3/lib*.so debian/build-serial-py3/lib*.a $(TMPDIR)/$(LIBDIR)/xdmf/serial mv $(TMPDIR)/usr/lib/python/* $(TMPDIR)/usr/lib/$(PY3)/xdmf - cp $(TMPDIR)/usr/lib/$(PY3)/xdmf/*.py $(TMPDIR)/usr/lib/$(PY2)/xdmf - cp debian/build-mpi-py2/_*.so $(TMPDIR)/usr/lib/$(PY2)/xdmf - cp debian/build-serial-py2/_*.so $(TMPDIR)/usr/lib/$(PY2)/xdmf/NoMpi cp debian/build-serial-py3/_*.so $(TMPDIR)/usr/lib/$(PY3)/xdmf/NoMpi #mv $(TMPDIR)/usr/lib/libXdmf.so.3 $(TMPDIR)/$(LIBDIR)/libXdmf.so.3.0 #mkdir -p $(TMPDIR)/$(LIBDIR)/cmake @@ -93,10 +75,8 @@ ## https://bugs.launchpad.net/ubuntu/+source/xdmf/+bug/1154071 #sed -e 's%@ARCH@%$(DEB_HOST_MULTIARCH)%' < debian/cmake.patch.in > debian/cmake.patch #(cd $(TMPDIR)/$(LIBDIR)/cmake/XdmfCMake && patch < ../../../../../../cmake.patch ) - mkdir -p $(TMPDIR)/usr/lib/$(PY2)/dist-packages $(TMPDIR)/usr/lib/$(PY3)/dist-packages - mv $(TMPDIR)/usr/lib/$(PY2)/xdmf $(TMPDIR)/usr/lib/$(PY2)/dist-packages/xdmf + mkdir -p $(TMPDIR)/usr/lib/$(PY3)/dist-packages mv $(TMPDIR)/usr/lib/$(PY3)/xdmf $(TMPDIR)/usr/lib/$(PY3)/dist-packages/xdmf - touch $(TMPDIR)/usr/lib/$(PY2)/dist-packages/xdmf/__init__.py touch $(TMPDIR)/usr/lib/$(PY3)/dist-packages/xdmf/__init__.py override_dh_auto_fixperms:

