Re: [cedet-semantic] Semantic python system includes
Brought to you by:
zappo
From: Eric L. <er...@si...> - 2016-06-04 21:17:44
|
On 05/30/2016 08:40 AM, Dominik Schrempf wrote: > Hello, > > I try to use Semantic with Python. It happens to me that Semantic only > parses includes that are actual module files but does not find modules > that are organized in a folder. > > For example, Semantic is perfectly fine with > : import matplotlib.pyplot > because "/usr/lib/python3.5/site-packages/matplotlib/pyplot.py" is a > file. > > However, it fails on > : import numpy > because "/usr/lib/python3.5/site-packages/numpy" is a folder. > > It may be that my configuration is wrong or missing (because I do not > specifiy any Python specific settings), but if not, is there a way to > circumvent this problem or are you aware of this problem? Hi, I did not author the python mode, so I don't know much about the specifics. I do know that expanding an import is language specific. To make the python import work, we'd need to create a semantic database for an imaginary numpy.py. semantic/db-javap.el does this for .jar files. If there is a rule for creating a list of interfaces in a directory like numpy, then creating that database would be a bit more straightforward than the java one that extracts symbols from .jar files. If someone's interested in trying it out can provide some sample files with expected results, I could help get you started. Eric |