Bill Janssen <[email protected]> wrote:
> Andi Vajda <[email protected]> wrote:
>
> > Ah ok, I missed that. The import of config.py can be surrounded by
> > try/
> > catch since SHARED is not needed during jcc build time. I'll add that
> > and simulate the execution path to find other such holes.
>
> Here's one I don't see a good workaround for:
>
> if __name__ == '__main__':
> import jcc.__main__
> else:
> from _jcc import initVM
>
> The import of "_jcc" will fail, too.
Got it:
if sys.platform == "win32":
_jccwindows = imp.load_source("_jccwindows", os.path.join(
os.path.dirname(__file__), "jcc", "windows.py"))
JAVAHOME = _jccwindows.get_jdk_root()
else:
JAVAHOME = None
> How about we put the code to find JAVAHOME (which is really JDKHOME, I
> think) in file at the same level as setup.py? It's not needed for
> later execution. That way we can just import it, use the code, and
> proceed with setup.py.
Actually, I want it for the JVM DLL finding, too.
Bill