When building sci-libs/gmsh-4.10.3 with the python use flag the module in not found Reproducible: Always Steps to Reproduce: 1.# USE=python emerge sci-libs/gmsh 2. $ python Python 3.10.5 (main, Aug 17 2022, 13:01:32) [GCC 12.1.1 20220625] on linux Type "help", "copyright", "credits" or "license" for more information. 3. >>> import gmsh Actual Results: >>> import gmsh Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'gmsh' Expected Results: >>> import gmsh
It looks like the gmsh.py file is installed in /usr/lib64/ (by cmake) and not where python can find it. I tried something like: <pre> src_install() { -snip- # The gmsh.py file is installed in /usr/lib64/ (by cmake) # and not where Python can find it if use shared ; then insinto /usr/lib/python3.10/site-packages doins api/gmsh.py fi } </pre> in an modified ebuild (I guess one should not hardcode the install paths but I do now how to set the site-packages path for the current Python version). NB. The api/gmsh.py is build when setting USE=shared and the python stuff which is enabled when gmsh is build with USE=python is the private (undocumented) python API which is a bit confusing. My guess is that USE=python should imply enabling the api/gmsh.py (and not internal python APIs used mainly for the developers of gmsh?).