[dolfin] 02/04: Include support for petsc4py and slepc4py

Drew Parsons dparsons at moszumanska.debian.org
Thu Aug 11 14:50:16 UTC 2016


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

dparsons pushed a commit to branch master
in repository dolfin.

commit 73abb7a9f7f2bec4b37f90726707b1934e9615dd
Author: Drew Parsons <dparsons at debian.org>
Date:   Thu Aug 11 15:01:47 2016 +0800

    Include support for petsc4py and slepc4py
    
    and fix quotes for petsc:Depends
---
 debian/changelog |  1 +
 debian/control   |  2 ++
 debian/rules     | 11 +++++++----
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 13c06e2..77e4398 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ dolfin (2016.1.0-2) UNRELEASED; urgency=medium
 
   * Enable build against version of PETSc (and SLEPc) provided by
     petsc-dev, e.g. PETSc 3.6 or 3.7.
+  * Include support for petsc4py and slepc4py.
 
  -- Drew Parsons <dparsons at debian.org>  Thu, 11 Aug 2016 12:43:56 +0800
 
diff --git a/debian/control b/debian/control
index e43b762..33915bb 100644
--- a/debian/control
+++ b/debian/control
@@ -30,6 +30,7 @@ Build-Depends:
  mpi-default-dev,
  petsc-dev (>= 3.6.4.dfsg1-2) [!kfreebsd-amd64 !kfreebsd-i386],
  slepc-dev (>= 3.6.3.dfsg1-6) [!kfreebsd-amd64 !kfreebsd-i386],
+ python-petsc4py, python-slepc4py,
  pkg-config,
  python-dev,
  python-ffc (>= 2016.1.0),
@@ -136,6 +137,7 @@ Depends:
  python-six,
  python-sympy,
  python-ufl (>= 2016.1.0),
+ ${petsc4py:Depends},
  ${misc:Depends},
  ${python:Depends},
  ${shlibs:Depends},
diff --git a/debian/rules b/debian/rules
index e6a702f..94a13ad 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,6 +29,7 @@ PETSC_MAJOR_VERSION=$(shell echo $(PETSC_UPSTREAM_VERSION) | sed "s/^\([^.]*\)\.
 # "Minor" version is the second number in the upstream version (major.minor.release)
 PETSC_MINOR_VERSION=$(shell echo $(PETSC_UPSTREAM_VERSION) | sed "s/^\([^.]*\)\.\([^.]*\)\..*$$/\2/")
 PETSC_VERSION=$(PETSC_MAJOR_VERSION).$(PETSC_MINOR_VERSION)
+PETSC_VERSION_NEXT=$(shell $(PETSC_MAJOR_VERSION).$$(($(PETSC_MINOR_VERSION)+1)))
 
 PETSC_DIR=/usr/lib/petscdir/$(PETSC_VERSION)-real
 # SLEPc version must match PETSc
@@ -48,8 +49,8 @@ CMAKE_OPTS := \
 	-D DOLFIN_ENABLE_PARMETIS:BOOL=OFF \
 	-D DOLFIN_ENABLE_PASTIX:BOOL=OFF \
 	-D DOLFIN_ENABLE_SCOTCH:BOOL=ON \
-	-D DOLFIN_ENABLE_PETSC4PY:BOOL=OFF \
-	-D DOLFIN_ENABLE_SLEPC4PY:BOOL=OFF \
+	-D DOLFIN_ENABLE_PETSC4PY:BOOL=ON \
+	-D DOLFIN_ENABLE_SLEPC4PY:BOOL=ON \
 	-D DOLFIN_ENABLE_SPHINX:BOOL=OFF \
 	-D DOLFIN_ENABLE_DOCS:BOOL=OFF \
 	-D DOLFIN_ENABLE_UNIT_TESTS:BOOL=OFF \
@@ -121,15 +122,17 @@ override_dh_auto_install:
 	sed -i "s|-DNDEBUG||g" $(CURDIR)/debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/pkgconfig/dolfin.pc
 	sed -i "s/-Wdate-time//g" $(CURDIR)/debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/pkgconfig/dolfin.pc
 
-# set petsc:Depends to something like "libpetsc3.7-dev, libslepc3.7-dev"
+# set petsc:Depends to something like "libpetsc3.7-dev, libslepc3.7-dev, python-petsc4py (>= 3.7), python-petsc4py (<<3.8), python-slepc4py (>= 3.7), python-slepc4py (<<3.8)"
 PETSC_DEV_DEPENDS="libpetsc$(PETSC_VERSION)-dev [!kfreebsd-amd64 !kfreebsd-i386], libslepc$(PETSC_VERSION)-dev [!kfreebsd-amd64 !kfreebsd-i386]"
+PETSC4PY_DEV_DEPENDS="python-petsc4py (>= $(PETSC_VERSION), python-petsc4py (<< $(PETSC_VERSION_NEXT)), python-slepc4py (>= $(PETSC_VERSION), python-slepc4py (<< $(PETSC_VERSION_NEXT))"
 override_dh_gencontrol:
 	# We have a tight dependency on swig - #675207
 	set -e; \
 	swig_version=$$(dpkg-query -W swig3.0 | cut -f 2 | cut -d- -f 1); \
 	next_swig_version="$${swig_version%.*}.$$(($${swig_version##*.} + 1))"; \
 	echo "swig:Depends=swig3.0 (>= $$swig_version), swig3.0 (<< $$next_swig_version~)" >> debian/python-dolfin.substvars
-	dh_gencontrol -- -Vpetsc:Depends="$(PETSC_DEV_DEPENDS)"
+	echo "petsc4py:Depends=$(PETSC4PY_DEV_DEPENDS)" >> debian/python-dolfin.substvars
+	dh_gencontrol -- -Vpetsc:Depends=$(PETSC_DEV_DEPENDS)
 
 override_dh_strip:
 	dh_strip -a --package=libdolfin2016.1 --dbg-package=libdolfin2016.1-dbg -Xpython

-- 
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