Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 867520 - sci-libs/gmsh-4.10.3 python bindings not found
Summary: sci-libs/gmsh-4.10.3 python bindings not found
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-30 16:35 UTC by Fredrik Lingvall
Modified: 2022-10-09 17:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fredrik Lingvall 2022-08-30 16:35:04 UTC
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
Comment 1 Fredrik Lingvall 2022-10-09 17:06:00 UTC
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?).