@@ -187,50 +187,8 @@ public static String getIDFPath()
187187 */
188188 public static String getIDFPythonEnvPath ()
189189 {
190- String idfPyEnvPath = new IDFEnvironmentVariables ().getEnvValue (IDFEnvironmentVariables .IDF_PYTHON_ENV_PATH );
191- idfPyEnvPath = idfPyEnvPath .strip ();
192- if (!StringUtil .isEmpty (idfPyEnvPath ))
193- {
194-
195- if (Platform .getOS ().equals (Platform .OS_WIN32 ))
196- {
197- idfPyEnvPath = idfPyEnvPath + "/" + "Scripts" ; //$NON-NLS-1$ //$NON-NLS-2$
198- }
199- else
200- {
201- idfPyEnvPath = idfPyEnvPath + "/" + "bin" ; //$NON-NLS-1$ //$NON-NLS-2$
202- }
203- java .nio .file .Path commandPath = findCommand (IDFConstants .PYTHON_CMD , idfPyEnvPath );
204- if (commandPath != null )
205- {
206- return commandPath .toFile ().getAbsolutePath ();
207- }
208- }
209- return findCommandFromBuildEnvPath (IDFConstants .PYTHON_CMD );
210-
211- }
212-
213- public static String getIDFPythonEnvPath (String idfPyEnvPath )
214- {
215- idfPyEnvPath = idfPyEnvPath .strip ();
216- if (!StringUtil .isEmpty (idfPyEnvPath ))
217- {
218-
219- if (Platform .getOS ().equals (Platform .OS_WIN32 ))
220- {
221- idfPyEnvPath = idfPyEnvPath + "/" + "Scripts" ; //$NON-NLS-1$ //$NON-NLS-2$
222- }
223- else
224- {
225- idfPyEnvPath = idfPyEnvPath + "/" + "bin" ; //$NON-NLS-1$ //$NON-NLS-2$
226- }
227- java .nio .file .Path commandPath = findCommand (IDFConstants .PYTHON_CMD , idfPyEnvPath );
228- if (commandPath != null )
229- {
230- return commandPath .toFile ().getAbsolutePath ();
231- }
232- }
233- return findCommandFromBuildEnvPath (IDFConstants .PYTHON_CMD );
190+ IDFEnvironmentVariables idfEnvironmentVariables = new IDFEnvironmentVariables ();
191+ return idfEnvironmentVariables .getEnvValue (IDFEnvironmentVariables .PYTHON_EXE_PATH );
234192
235193 }
236194
@@ -250,17 +208,8 @@ public static boolean checkIfIdfSupportsSpaces()
250208
251209 public static String getPythonExecutable ()
252210 {
253- IPath pythonPath = new SystemExecutableFinder ().find (IDFConstants .PYTHON3_CMD ); // look for python3
254- if (pythonPath == null )
255- {
256- pythonPath = new SystemExecutableFinder ().find (IDFConstants .PYTHON_CMD ); // look for python
257- }
258- if (pythonPath != null )
259- {
260- return pythonPath .toOSString ();
261- }
262-
263- return IDFConstants .PYTHON_CMD ;
211+ IDFEnvironmentVariables idfEnvironmentVariables = new IDFEnvironmentVariables ();
212+ return idfEnvironmentVariables .getEnvValue (IDFEnvironmentVariables .PYTHON_EXE_PATH );
264213 }
265214
266215 /**
0 commit comments