[dolfin] 01/01: * d/rules: - Re-generate swig interface with correct Python version before build and install (Closes: #863829). - Build for Python 2 after Python 3 by switching the order in PYVERS, since Python 2 is default. * Add patch vtk-python2-only-cmake-usefile.patch that disables the vtk section in UseDOLFIN.cmake for Python 3 (Closes: #863828). * d/control: Add python-ffc to Depends for binary package libdolfin-dev (provides ufc.h).

Johannes Ring johannr-guest at moszumanska.debian.org
Thu Jun 1 08:57:48 UTC 2017


This is an automated email from the git hooks/post-receive script.

johannr-guest pushed a commit to branch master
in repository dolfin.

commit 95a52a9a31ea9a66896c9e542de7fc6542330118
Author: Johannes Ring <johannr at simula.no>
Date:   Thu Jun 1 10:57:22 2017 +0200

    * d/rules:
      - Re-generate swig interface with correct Python version
        before build and install (Closes: #863829).
      - Build for Python 2 after Python 3 by switching the order in
        PYVERS, since Python 2 is default.
    * Add patch vtk-python2-only-cmake-usefile.patch that disables the
      vtk section in UseDOLFIN.cmake for Python 3 (Closes: #863828).
    * d/control: Add python-ffc to Depends for binary package
      libdolfin-dev (provides ufc.h).
---
 debian/changelog                                    | 14 ++++++++++++++
 debian/control                                      |  1 +
 debian/patches/series                               |  1 +
 debian/patches/vtk-python2-only-cmake-usefile.patch | 12 ++++++++++++
 debian/rules                                        |  5 +++--
 5 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index eb4e08c..747e43a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+dolfin (2016.2.0-4) UNRELEASED; urgency=medium
+
+  * d/rules:
+    - Re-generate swig interface with correct Python version
+      before build and install (Closes: #863829).
+    - Build for Python 2 after Python 3 by switching the order in
+      PYVERS, since Python 2 is default.
+  * Add patch vtk-python2-only-cmake-usefile.patch that disables the
+    vtk section in UseDOLFIN.cmake for Python 3 (Closes: #863828).
+  * d/control: Add python-ffc to Depends for binary package
+    libdolfin-dev (provides ufc.h).
+
+ -- Johannes Ring <johannr at simula.no>  Thu, 01 Jun 2017 10:08:39 +0200
+
 dolfin (2016.2.0-3) unstable; urgency=medium
 
   [ Drew Parsons ]
diff --git a/debian/control b/debian/control
index 7aa4786..1c21bab 100644
--- a/debian/control
+++ b/debian/control
@@ -77,6 +77,7 @@ Depends:
  libvtk6-dev,
  libxml2-dev,
  pkg-config,
+ python-ffc (>= ${source:Upstream-Version}), python-ffc (<< ${source:Next-Upstream-Version}),
  ${petsc:Depends},
  ${python-petsc4py:Depends},
  ${python3-petsc4py:Depends},
diff --git a/debian/patches/series b/debian/patches/series
index c5d62c7..9a23a31 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 python3-support.patch
 python3-decode.patch
+vtk-python2-only-cmake-usefile.patch
diff --git a/debian/patches/vtk-python2-only-cmake-usefile.patch b/debian/patches/vtk-python2-only-cmake-usefile.patch
new file mode 100644
index 0000000..5965432
--- /dev/null
+++ b/debian/patches/vtk-python2-only-cmake-usefile.patch
@@ -0,0 +1,12 @@
+diff -Nru dolfin-2016.2.0.orig/cmake/templates/UseDOLFIN.cmake.in dolfin-2016.2.0/cmake/templates/UseDOLFIN.cmake.in
+--- dolfin-2016.2.0.orig/cmake/templates/UseDOLFIN.cmake.in	2017-05-29 18:50:27.456829890 +0200
++++ dolfin-2016.2.0/cmake/templates/UseDOLFIN.cmake.in	2017-06-01 10:40:07.542728575 +0200
+@@ -16,7 +16,7 @@
+   # Need to get VTK config because VTK uses advanced VTK features
+   # which mean it's not enough to just link to the DOLFIN target. See
+   # http://www.vtk.org/pipermail/vtk-developers/2013-October/014402.html
+-  if (@VTK_FOUND@)
++  if (@VTK_FOUND@ AND "${PYTHON_VERSION_MAJOR}" STREQUAL "2")
+     find_package(VTK HINTS ${VTK_DIR} $ENV{VTK_DIR} NO_MODULE QUIET)
+     if (VTK_FOUND)
+       include(${VTK_USE_FILE})
diff --git a/debian/rules b/debian/rules
index f72ee87..ad6f166 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,7 +31,7 @@ DOLFIN_HOME = $(CURDIR)/$(DEB_SRCDIR)
 USCAN_DESTDIR := $(CURDIR)
 PY2VERS := $(shell pyversions --requested debian/control | tac -s' ')
 PY3VERS := $(shell py3versions --requested debian/control | tac -s' ')
-PYVERS = $(PY2VERS) $(PY3VERS)
+PYVERS = $(PY3VERS) $(PY2VERS)
 
 # extract PETSc version from petsc-dev
 PETSC_DEB_VERSION=$(shell dpkg -s petsc-dev | awk '/Version:/ {print $2}')
@@ -90,7 +90,6 @@ override_dh_auto_clean:
 
 override_dh_auto_configure:
 	for v in $(PYVERS); do \
-	    $$v cmake/scripts/generate-swig-interface.py; \
 	    if [ "$$v" = "python2.7" ]; then \
 	        dh_auto_configure --builddirectory=$(BUILDDIR)-$$v -- \
 	           -D PYTHON_EXECUTABLE:FILEPATH=/usr/bin/$$v \
@@ -106,11 +105,13 @@ override_dh_auto_configure:
 
 override_dh_auto_build:
 	for v in $(PYVERS); do \
+	   $$v cmake/scripts/generate-swig-interface.py; \
 	   dh_auto_build --builddirectory=$(BUILDDIR)-$$v; \
 	done
 
 override_dh_auto_install:
 	for v in $(PYVERS); do \
+	   $$v cmake/scripts/generate-swig-interface.py; \
 	   dh_auto_install --builddirectory=$(BUILDDIR)-$$v; \
 	done
 	dh_numpy

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/fenics/dolfin.git



More information about the debian-science-commits mailing list