[instant] 01/01: Add patch to make Python 2 and Python 3 side-by-side installations of DOLFIN work

Johannes Ring johannr-guest at moszumanska.debian.org
Tue Jun 6 15:59:22 UTC 2017


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

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

commit 4fa726bacce4aaabd2f57b1f986d30acf33c8052
Author: Johannes Ring <johannr at simula.no>
Date:   Tue Jun 6 17:57:29 2017 +0200

    Add patch to make Python 2 and Python 3 side-by-side installations of DOLFIN work
---
 debian/changelog                                 |  8 ++++++
 debian/patches/python-cmake-fix-for-dolfin.patch | 35 ++++++++++++++++++++++++
 debian/patches/series                            |  1 +
 3 files changed, 44 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index a68c087..f909f99 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+instant (2016.2.0-3) unstable; urgency=medium
+
+  * d/patches/python-cmake-fix-for-dolfin.patch: Add patch to fix CMake
+    file that Instant generates for DOLFIN. This is needed for Python 2
+    and Python 3 side-by-side installations.
+
+ -- Johannes Ring <johannr at simula.no>  Tue, 06 Jun 2017 17:55:04 +0200
+
 instant (2016.2.0-2) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/python-cmake-fix-for-dolfin.patch b/debian/patches/python-cmake-fix-for-dolfin.patch
new file mode 100644
index 0000000..9590077
--- /dev/null
+++ b/debian/patches/python-cmake-fix-for-dolfin.patch
@@ -0,0 +1,35 @@
+From 67be09da6e9cd8907bddba7e1363da8953851bda Mon Sep 17 00:00:00 2001
+From: Johannes Ring <johannr at simula.no>
+Date: Tue, 25 Apr 2017 14:34:46 +0200
+Subject: [PATCH] Set PYTHON_EXECUTABLE to sys.executable in generated CMake
+ file (used for python 2 and python 3 side-by-side installations of DOLFIN).
+
+---
+ instant/codegeneration.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/instant/codegeneration.py b/instant/codegeneration.py
+index 69d9644..692d7b4 100644
+--- a/instant/codegeneration.py
++++ b/instant/codegeneration.py
+@@ -380,6 +380,8 @@ ENDIF(%(package)s_FOUND)
+ 
+     cmake_form = dict(module_name=module_name)
+ 
++    cmake_form["python_executable"] = sys.executable
++
+     cmake_form["extra_libraries"] = ";".join(libraries)
+     cmake_form["extra_include_dirs"] = ";".join(include_dirs)
+     cmake_form["extra_library_dirs"] = ";".join(library_dirs)
+@@ -453,6 +455,8 @@ set (NAME %(module_name)s)
+ 
+ PROJECT(${NAME})
+ 
++set(PYTHON_EXECUTABLE %(python_executable)s)
++
+ %(find_packages)s
+ 
+ %(cppargs)s
+-- 
+2.7.4.1.g5468f9e
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5dcfa7b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+python-cmake-fix-for-dolfin.patch

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



More information about the debian-science-commits mailing list