[ 
https://issues.apache.org/jira/browse/SLING-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712484#action_12712484
 ] 

Aaron Zeckoski commented on SLING-835:
--------------------------------------

If the issue is cache files related to python then the "python.cachedir" 
setting might be more important here (though this should get set right if the 
python.home is set correctly). Since python.home is not always the same on 
every machine I assume we probably want something like this in the constructor 
for PythonScriptEngineFactory:
        Properties props = new Properties();
        props.put("python.home", configuredPythonHome);
        PythonInterpreter.initialize(System.getProperties(),
                props, new String[0]);

I would think it would be ideal to get the configuredPythonHome value from the 
OSGi configuration.
If you give me a tip about how to do that I will be happy to submit a patch for 
this.

> Python: python.home must be set
> -------------------------------
>
>                 Key: SLING-835
>                 URL: https://issues.apache.org/jira/browse/SLING-835
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>            Reporter: Felix Meschberger
>
> It seems that currently the python.home property is not set for the 
> PythonInterpreter, which causes the cachedir containing some Java Library 
> stuff caches to be created in the current working directory.
> I think, the PythonScriptEngineFactory should setup the PythonInterpreter 
> with correct setup information by calling the static 
> PythonInterpreter.initialize method before creating the first 
> PythonScriptEngine instance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to