Bugfixes in install command

This commit is contained in:
Sven Heidemann 2021-03-17 08:12:56 +01:00
parent 5669807628
commit f69500418e
2 changed files with 7 additions and 6 deletions

View File

@ -92,8 +92,8 @@ class InstallService(CommandABC):
if '==' in dependency: if '==' in dependency:
dependency_version = dependency.split('==')[1] dependency_version = dependency.split('==')[1]
if package in dependency: if name in dependency:
if version.parse(package_version) != version.parse(dependency_version): if package_version != '' and version.parse(package_version) != version.parse(dependency_version):
to_remove_list.append(dependency) to_remove_list.append(dependency)
break break
else: else:
@ -145,9 +145,9 @@ class InstallService(CommandABC):
BuildSettings.__name__: SettingsHelper.get_build_settings_dict(self._build_settings) BuildSettings.__name__: SettingsHelper.get_build_settings_dict(self._build_settings)
} }
#with open(os.path.join(self._runtime.working_directory, 'cpl.json'), 'w') as project_file: with open(os.path.join(self._runtime.working_directory, 'cpl.json'), 'w') as project_file:
# project_file.write(json.dumps(config, indent=2)) project_file.write(json.dumps(config, indent=2))
# project_file.close() project_file.close()
Pip.reset_executable() Pip.reset_executable()

View File

@ -16,7 +16,8 @@
"LicenseName": "MIT", "LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.", "LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [ "Dependencies": [
"sh_cpl==2021.4.1.post11" "sh_cpl==2021.4.1.post11",
"discord.py==1.6.0"
], ],
"PythonVersion": ">=3.8", "PythonVersion": ">=3.8",
"PythonPath": "../../../../cpl-env/bin/python3.9", "PythonPath": "../../../../cpl-env/bin/python3.9",