[PATCH] D67583: Fix swig python package path
Haibo Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 19 16:12:04 PDT 2019
hhb added a comment.
In D67583#1675697 <https://reviews.llvm.org/D67583#1675697>, @ZeGentzy wrote:
> In D67583#1675415 <https://reviews.llvm.org/D67583#1675415>, @hhb wrote:
>
> > Oh sorry my mistake. The current directory should be llvm-project/lldb/scripts. I.e.
> >
> > cd /src/llvm-project/lldb/scripts
> >
>
>
> Maybe I'm doing something wrong, but that does not work either.
>
> $ python a.py
> Traceback (most recent call last):
> File "a.py", line 3, in <module>
> import finishSwigPythonLLDB
> ModuleNotFoundError: No module named 'finishSwigPythonLLDB'
>
> $ python2 a.py
> Traceback (most recent call last):
> File "a.py", line 3, in <module>
> import finishSwigPythonLLDB
> ImportError: No module named finishSwigPythonLLDB
>
> $ pwd
> /home/gentz/Documents/aur/gfx/backups/second/llvm-git-gentz/llvm-git-gentz/src/llvm-project32/lldb/scripts
>
> $ cat a.py
> import sys
> sys.path.append('/src/llvm-project/lldb/scripts/Python')
> import finishSwigPythonLLDB
> vDictArgs = {"--srcRoot": "/src/llvm-project/lldb",
> "--targetDir": "/src/out/./lib32",
> "--cfgBldDir": "/src/out/tools/lldb/scripts",
> "--prefix": "/src/out",
> "--cmakeBuildConfiguration": ".",
> "--lldbLibDir": "lib32",
> "-m": None,
> }
> finishSwigPythonLLDB.get_framework_python_dir(vDictArgs)
>
My theory now is that your python has a different implementation of get_python_lib(). After all we should not guess what python would do. I'm making a change.
If you still interested in testing that, you can fix the path in a.py...
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67583/new/
https://reviews.llvm.org/D67583
More information about the llvm-commits
mailing list