[Lldb-commits] [PATCH] D58172: Embed swig version into lldb.py in a different way
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 14 10:21:25 PST 2019
zturner added a comment.
Long term, I wonder if we can just delete this entire `modify-python-lldb.py` script. it seems like the entire purpose is to make sure that the SB methods support iteration, equality, and some other basic stuff, and it does this by inserting lines of python code into the actual `__init__.py` file. It seems like we could just have the swig file say `%pythoncode%{import sb_iteration}`, then write a file called `sb_iteration.py` which we ship alongside the `__init__.py`, and have it dynamically add all of the things it needs at runtime. Then, we don't even need a a post processing step at all, which seems like a definite improvement.
As for this particular change, another option is to just say:
%pythoncode%{
swig_version = VERSION
}
There's no real reason we have to do the parsing here, we could do it in our dotest.py decorators. I don't have a strong preference on which is better though.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58172/new/
https://reviews.llvm.org/D58172
More information about the lldb-commits
mailing list