-
-
Couldn't load subscription status.
- Fork 324
PythonVersions.pas - improved PythonVersionFromPath with a new parameter FindLatestVersion #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PythonVersionFromPath was meant to be used with the home path of python. So it checks whether python.exe exists in the same folder as the python??.dll. In QGIS is python.exe located in the same folder as the dll? And if there more than one dll's are located in the bin folder to which version python.exe corresponds to?
// check if same platform
try
if {$IFDEF CPUX64}not {$ENDIF}IsEXEx64(DLLPath+'\python.exe') then Exit;
except
Exit;
end;
As mentioned above PythonVersionFromPath was meant to be used with the home path of python and not with another path that just contains dlls and exes. Other PythonVersions functionality will not work (is_venv, is_virtualenv etc.). Also, your version PythonVersionFromPath is much slower than the original, since it uses FileExist for all possible python??.dll.
QGIS folder setup is a special case that you can accomodate in your own code.
I've implemented this feature it as you suggested.