use of com.jetbrains.python.HelperPackage in project intellij-community by JetBrains.
the class BuildoutFacet method patchCommandLineForBuildout.
public void patchCommandLineForBuildout(GeneralCommandLine commandLine) {
Map<String, String> env = commandLine.getEnvironment();
ParametersList params = commandLine.getParametersList();
// alter execution script
ParamsGroup scriptParams = params.getParamsGroup(PythonCommandLineState.GROUP_SCRIPT);
assert scriptParams != null;
if (scriptParams.getParameters().size() > 0) {
// expect DjangoUtil.MANAGE_FILE
String normalScript = scriptParams.getParameters().get(0);
HelperPackage engulfer = PythonHelper.BUILDOUT_ENGULFER;
env.put("PYCHARM_ENGULF_SCRIPT", getConfiguration().getScriptName());
scriptParams.getParametersList().replaceOrPrepend(normalScript, engulfer.asParamString());
}
// add pycharm helpers to pythonpath so that fixGetpass is importable
PythonEnvUtil.addToPythonPath(env, PythonHelpersLocator.getHelpersRoot().getAbsolutePath());
/*
// set prependable paths
List<String> paths = facet.getAdditionalPythonPath();
if (paths != null) {
path_value = PyUtil.joinWith(File.pathSeparator, paths);
env.put("PYCHARM_PREPEND_SYSPATH", path_value);
}
*/
}
Aggregations