On Thu, Mar 12, 2015 at 9:27 AM, Johannes Ring <[email protected]> wrote:
> On Thu, Mar 12, 2015 at 9:16 AM, Johan Hake <[email protected]> wrote:
>> If you take the pain of building a new debian package of SWIG you should
>> bump the version to latest. There were a lot of regressions in 3.0.3 (which
>> I am pretty sure do not affect us!) that was fixed in the two small
>> following releases.
>
> Good point! I will use 3.0.5.

I have made a package for SWIG 3.0.5 now. It is available in the
fenics-exp PPA 
(https://launchpad.net/~fenics-packages/+archive/ubuntu/fenics-exp).
The binary is installed as /usr/bin/swig3.0. This allows to have both
SWIG 2.0 and 3.0 installed simultaneously. Since DOLFIN uses the same
SWIG binary as FFC/UFC we also need to update FFC. I think something
like the patch below will work.

Johannes

diff --git a/setup.py b/setup.py
index 6adf6c1..4b47156 100755
--- a/setup.py
+++ b/setup.py
@@ -56,16 +56,12 @@ def get_installation_prefix():
 def get_swig_executable():
     "Get SWIG executable"

-    # SWIG >= 2.0.0 is required for Python 2 and >= 3.0.3 for Python 3
-    if sys.version_info[0] < 3:
-        swig_minimum_version = [2, 0, 0]
-    else:
-        swig_minimum_version = [3, 0, 3]
+    swig_minimum_version = [3, 0, 3]
     swig_minimum_version_str = ".".join([str(x) for x in swig_minimum_version])

     # Find SWIG executable
     swig_executable = None
-    for executable in ["swig", "swig3.0", "swig2.0"]:
+    for executable in ["swig3.0", "swig"]:
         swig_executable = spawn.find_executable(executable)
         if swig_executable is not None:
             break
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to