Improved python executable handling
This commit is contained in:
@@ -48,7 +48,7 @@ class InstallService(CommandABC):
|
||||
Error.error('Found invalid dependencies in cpl.json.')
|
||||
return
|
||||
|
||||
Pip.set_executable(self._project_settings.python_path)
|
||||
Pip.set_executable(self._project_settings.python_executable)
|
||||
for dependency in self._project_settings.dependencies:
|
||||
Console.spinner(
|
||||
f'Installing: {dependency}',
|
||||
@@ -69,7 +69,7 @@ class InstallService(CommandABC):
|
||||
:return:
|
||||
"""
|
||||
is_already_in_project = False
|
||||
Pip.set_executable(self._project_settings.python_path)
|
||||
Pip.set_executable(self._project_settings.python_executable)
|
||||
|
||||
if self._project_settings is None or self._build_settings is None:
|
||||
Error.error('The command requires to be run in an CPL project, but a project could not be found.')
|
||||
|
@@ -87,6 +87,9 @@ class NewService(CommandABC):
|
||||
f'sh_cpl=={version.parse(cpl.__version__)}'
|
||||
],
|
||||
ProjectSettingsNameEnum.python_version.value: f'>={sys.version.split(" ")[0]}',
|
||||
ProjectSettingsNameEnum.python_path.value: {
|
||||
sys.platform: ''
|
||||
},
|
||||
ProjectSettingsNameEnum.classifiers.value: []
|
||||
}
|
||||
|
||||
|
@@ -40,7 +40,7 @@ class UninstallService(CommandABC):
|
||||
Console.error(f'Usage: cpl uninstall <package>')
|
||||
return
|
||||
|
||||
Pip.set_executable(self._project_settings.python_path)
|
||||
Pip.set_executable(self._project_settings.python_executable)
|
||||
|
||||
package = args[0]
|
||||
is_in_dependencies = False
|
||||
|
@@ -127,7 +127,7 @@ class UpdateService(CommandABC):
|
||||
:param args:
|
||||
:return:
|
||||
"""
|
||||
Pip.set_executable(self._project_settings.python_path)
|
||||
Pip.set_executable(self._project_settings.python_executable)
|
||||
self._check_project_dependencies()
|
||||
self._check_outdated()
|
||||
Pip.reset_executable()
|
||||
|
Reference in New Issue
Block a user