CMake out-of-source build does not create python module correctly
AlexanderViand opened this issue · comments
Issue
When building out-of-source, the python module does not seem to be created correctly.
Trying to run python3 tests/all.py
results in the following error message:
Traceback (most recent call last):
File "tests/all.py", line 4, in <module>
from bug_fixes import *
File "/mnt/c/Code/EVA/build/tests/bug_fixes.py", line 5, in <module>
from common import *
File "/mnt/c/Code/EVA/build/tests/common.py", line 6, in <module>
from eva import evaluate
File "/mnt/c/Code/EVA/python/eva/__init__.py", line 4, in <module>
from ._eva import *
ModuleNotFoundError: No module named 'eva._eva'
How To Reproduce
In a freshly cloned EVA repository:
git submodule update --init
mkdir build
cd build
cmake ..
make -j
python3 -m pip install -e python/
python3 ../tests/all.py
Notes
When building in-tree (i.e., cmake .
in the main dir) running the tests works fine. I assume there are some files in the source tree that aren't copied into the build dir but are necessary?
Nevermind, seems like it was a local config issue, out-of-source also works fine after cleaning up my python environments a bit.