|
From: Samuele P. <pe...@in...> - 2000-11-30 14:18:14
|
Hi. [Finn] > Update of /cvsroot/jython/jython/Tools/jythonc > In directory slayer.i.sourceforge.net:/tmp/cvs-serv28475 > > Modified Files: > compile.py SimpleCompiler.py > Log Message: > A small hack to fix bug 123627. This does not solve the dynamic > issues with finding modules in __path__, but it works in the > situations where the dotted package names matches the directory > structure. Very good. I don't think it makes very much sense too support the dynamic __path__ values in jythonc, in python it seems to me they are supposed to be set depending on something only known at runtime. To use their values at compilation time seems not so much useful. I'm not sure of that: should not also SimpleCompiler._getnames be modified to support pkg rel imports. ***** I'm working on the cache fix, as I wrote I would like to write different caches that are chosen depending on java 1.1/2 env and options from the config files. I have noticed that in general Options.setFromRegistry is called before the first PyJavaClass.lookup, which is good, but for example in the embedding case (e.g. SimpleEmbedded.java) when PythonInterpreter ctr is called without first issueing a Py.initialize, PyJavaClass.lookup is called before Options.setFromRegistry. Should we state that Py.initialize should be issued before using any other part of runtime. Or someone can propose a workaround. I should be able to know the value of the newly introduced cache options in PyJavaClass.lookup in order to construct the right/requested kind of cache. Hints are welcome. regards, Samuele. |