Graph-tool fails to load when build path contained non-ascii symbols
When path to sources contains non-ascii symbols (for me, it was "/home/dmitry/Загрузки/graph-tool-2.2.26"), the library fails to load with the following traceback (though, build finished with no errors):
dmitry@teufel:~/workspace> python
Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from graph_tool.all import *
# ...skipped some unrelated warnings
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/graph_tool/all.py", line 49, in <module>
from graph_tool.run_action import *
File "/usr/lib/python2.7/site-packages/graph_tool/run_action/__init__.py", line 44, in <module>
from .inline import inline
File "/usr/lib/python2.7/site-packages/graph_tool/run_action/inline.py", line 63, in <module>
headers_hash = hashlib.md5((headers_hash + open(inc).read()).encode('utf-8')).hexdigest()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 3974: ordinal not in range(128)
I found that it fails when reading the "include/config.h" file, stopping at the following lines:
/* package source dir */
#define PACKAGE_SOURCE_DIR "/home/dmitry/Загрузки/graph-tool-2.2.26"
My workaround was to change this value to anything else with ascii symbols only, and it looks like this var is never used later.