Support optimized modules in import analysis
Brought to you by:
fabioz
The Python interpreter I work against has (for reasons that are a little complicated) all of its stdlib and site-packages modules compiled to pyo-files (optimized). PyDev doesn't seem to handle this, causing them to show up as unresolved imports when analyzed. It would be nice if there was a way to specify command-line arguments to the copy of Python that (I presume) is spawned for analysis. Then I could pass it -OO, as I do via the 'VM arguments' field in my run configurations, so it would be able to find all the modules.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "(deprecated) Please use https://www.brainwy.com/tracker/PyDev/"
Pydev really needs the .py files to work (the .pyo file should be generated when you run Python with the optimization flags -- so, your run configuration should be different, not python itself).
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "(deprecated) Please use https://www.brainwy.com/tracker/PyDev/"
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "(deprecated) Please use https://www.brainwy.com/tracker/PyDev/"
A bit more background: I work on a piece of software that bundles in a Python interpreter. To save space, the entire stdlib (Lib and site-packages) is pre-compiled to .pyo, then the original .py files are stripped out. I develop against the interpreter we actually ship, to avoid missing any potential differences. PyDev works well for this, in all ways except code analysis.
Does the code analysis plugin really parse all the .py files for stdlib imports, zip-imports and egg-files? It seems like using Python's existing import mechanism would be easier.