| 1 |
--- a/python/dolfin/jit/jit.py |
| 2 |
+++ b/python/dolfin/jit/jit.py |
| 3 |
@@ -3,6 +3,7 @@ |
| 4 |
import pkgconfig |
| 5 |
import numpy |
| 6 |
import hashlib |
| 7 |
+import sysconfig |
| 8 |
import dijitso |
| 9 |
import dolfin.cpp as cpp |
| 10 |
import dolfin.la as la |
| 11 |
@@ -160,7 +161,10 @@ |
| 12 |
if hasattr(v, '_cpp_object') and isinstance(v._cpp_object, cpp.function.GenericFunction): |
| 13 |
property_str += '*' |
| 14 |
|
| 15 |
- hash_str = str(statements) + str(property_str) + cpp.__version__ |
| 16 |
+ hash_str = ( |
| 17 |
+ str(statements) + str(property_str) + cpp.__version__ |
| 18 |
+ + sysconfig.get_config_var("CFLAGS") + sysconfig.get_config_var("SOABI") |
| 19 |
+ ) |
| 20 |
module_hash = hashlib.md5(hash_str.encode('utf-8')).hexdigest() |
| 21 |
module_name = "dolfin_" + name + "_" + module_hash |
| 22 |
|
| 23 |
--- a/python/dolfin/jit/pybind11jit.py |
| 24 |
+++ b/python/dolfin/jit/pybind11jit.py |
| 25 |
@@ -4,6 +4,7 @@ |
| 26 |
import dijitso |
| 27 |
import re |
| 28 |
import sys |
| 29 |
+import sysconfig |
| 30 |
|
| 31 |
from dolfin.cpp.log import log, LogLevel |
| 32 |
from . import get_pybind_include |
| 33 |
@@ -88,7 +89,10 @@ |
| 34 |
# params['build']['libs'] += ['petsc'] |
| 35 |
# params['build']['lib_dirs'] += [os.environ["PETSC_DIR"] + "/lib"] |
| 36 |
|
| 37 |
- hash_str = cpp_code + cpp.__version__ |
| 38 |
+ hash_str = ( |
| 39 |
+ cpp_code + cpp.__version__ |
| 40 |
+ + sysconfig.get_config_var("CFLAGS") + sysconfig.get_config_var("SOABI") |
| 41 |
+ ) |
| 42 |
module_hash = hashlib.md5(hash_str.encode('utf-8')).hexdigest() |
| 43 |
module_name = "dolfin_cpp_module_" + module_hash |
| 44 |
|