[dolfin] 01/02: Let CMake figure out Python details automatically

Johannes Ring johannr-guest at moszumanska.debian.org
Thu May 11 09:59:19 UTC 2017


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

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

commit 966b9f941922560651d20c03178eb877f2d7a20e
Author: Johannes Ring <johannr at simula.no>
Date:   Thu May 11 11:41:38 2017 +0200

    Let CMake figure out Python details automatically
---
 debian/changelog |  4 +++-
 debian/rules     | 32 +++++++++-----------------------
 2 files changed, 12 insertions(+), 24 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index df72f72..94a1027 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,8 +14,10 @@ dolfin (2017.1.0-1) UNRELEASED; urgency=medium
     - Bump minimum required version for python-dijitso and python-ffc to
       2017.1.
   * Move d/libdolfin2016.2.install -> d/libdolfin2017.1.install.
+  * d/rules:
+    - Let CMake figure out Python details automatically.
 
- -- Johannes Ring <johannr at simula.no>  Wed, 10 May 2017 14:50:00 +0200
+ -- Johannes Ring <johannr at simula.no>  Wed, 10 May 2017 18:24:43 +0200
 
 dolfin (2016.2.0-2) unstable; urgency=medium
 
diff --git a/debian/rules b/debian/rules
index 5e41ff8..ca03ec6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -74,25 +74,8 @@ CMAKE_OPTS := \
 	-D DOLFIN_LIB_DIR:PATH=lib/$(DEB_BUILD_MULTIARCH) \
 	-D DOLFIN_PKGCONFIG_DIR:PATH=lib/$(DEB_BUILD_MULTIARCH)/pkgconfig \
 	-D CMAKE_CXX_FLAGS:STRING="-fpermissive" \
-	-D DOLFIN_USE_PYTHON3:BOOL=OFF \
 	$(DOLFIN_HOME)
 
-ifeq (,$(DISTRIBUTION))
-        DISTRIBUTION := $(shell dpkg-parsechangelog --format rfc822 | sed -ne "s/^Distribution: //p")
-endif
-
-ifneq ($(DISTRIBUTION),$(findstring $(DISTRIBUTION),"squeeze wheezy lucid maverick natty oneiric precise quantal raring saucy trusty utopic vivid wily xenial yakkety zesty"))
-        DISTRIBUTION := sid
-endif
-
-ifneq (,$(findstring $(DISTRIBUTION),"raring saucy sid"))
-        PYTHON_INCLUDE_DIR2 = /usr/include/$(DEB_BUILD_MULTIARCH)
-        PYTHON_LIBRARY_DIR = /usr/lib/$(DEB_BUILD_MULTIARCH)
-else
-        PYTHON_INCLUDE_DIR2 = /usr/include
-        PYTHON_LIBRARY_DIR = /usr/lib
-endif
-
 %:
 	dh $@ --buildsystem=cmake \
 	      --builddirectory=$(BUILDDIR)-$(DEFAULT_PYVER) \
@@ -109,12 +92,15 @@ override_dh_auto_clean:
 
 override_dh_auto_configure:
 	for v in $(PYVERS); do \
-	dh_auto_configure --builddirectory=$(BUILDDIR)-$$v -- \
-	   -D PYTHON_EXECUTABLE:FILEPATH=/usr/bin/$$v \
-	   -D PYTHON_LIBRARY:FILEPATH=$(PYTHON_LIBRARY_DIR)/lib$$v.so \
-	   -D PYTHON_INCLUDE_DIR:PATH=/usr/include/$$v \
-	   -D PYTHON_INCLUDE_DIR2:PATH=$(PYTHON_INCLUDE_DIR2)/$$v \
-	   -- $(CMAKE_OPTS) ;\
+	    if [ "$$v" = "python2.7" ]; then \
+	        USE_PYTHON3=OFF; \
+	    else \
+	        USE_PYTHON3=ON; \
+	    fi; \
+	    dh_auto_configure --builddirectory=$(BUILDDIR)-$$v -- \
+	       -D PYTHON_EXECUTABLE:FILEPATH=/usr/bin/$$v \
+	       -D DOLFIN_USE_PYTHON3:BOOL=$(USE_PYTHON3) \
+	       -- $(CMAKE_OPTS) ;\
 	done
 
 override_dh_auto_build:

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