Python binding for igl_adjacency_list(const MatrixXi& F, vector<vector<int>& A, bool sorted). Use an opaque type for the output parameter A.

I also fixed a couple of bugs in generate_docstrings.py:
1) We were checking for an empty string where a result could also be Nonn.
2) If you forgot to end the argument path with  a slash, the output would be incorrect
3) We were coupled to a specific version of clang for no reason
4) Python 3 clang binding support was only added in April 2017 (https://reviews.llvm.org/D31568). Using python3 by default will not work on the clang bindings which ship with pip and most Linux distros. Let's change the hashbang to use python2 for now.
5) The documentation for the script was a bit confusing.
This commit is contained in:
Francis Williams
2017-07-05 13:31:03 -04:00
parent 3abd9ae411
commit 230ab71e20
9 changed files with 62 additions and 25 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ def parse(path):
# Clang can't parse files with missing definitions, add static library definition or not?
args = ['-x', 'c++', '-std=c++11', '-fparse-all-comments', '-DIGL_STATIC_LIBRARY']
args.append('-I/usr/include/eigen3/') # TODO Properly add all needed includes
syspath = ccsyspath.system_include_paths('clang++-3.7') # Add the system libraries
syspath = ccsyspath.system_include_paths('clang++') # Add the system libraries
incargs = [(b'-I' + inc).decode("utf-8") for inc in syspath]
args.extend(incargs)