- removed milestone
I know this might not be supported but when running on MinGW, compiling dolfin expressions with cmake or distutils for that matter fails because the hash is too long. Windows only handles ~256 characters path. The hack below in dolfin.compilemodules.compilemodule.py seems to do the trick but I am wondering if there is a better solution that would minimize hash collisions with shorter hash strings.
# Create unique module name for this application run
if module_name is "":
if sys.platform == 'win32':
hash = hashlib.md5
else:
#breaks on windows because of max path length (Chaffra)
hash = hashlib.sha1
module_name = "dolfin_%s" % \
hash((repr(code) +
dolfin.__version__ +
str(_interface_version) +
additional_declarations +
str(additional_system_headers) +
repr(instant_kwargs)).encode("utf-8")
).hexdigest()
if sys.platform == 'win32':
module_name = module_name[0:17]
Removing milestone: 1.7 (automated comment)