MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _find_installed_software

Function _find_installed_software

SLiCAP/SLiCAPconfigure.py:212–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

210 return cmd
211
212def _find_installed_software():
213 system = platform.system()
214 commands = {}
215 commands['ltspice'] = _find_LTspice_wine()
216 commands['kicad'] = 'kicad-cli'
217 commands['geda'] = 'gnetlist'
218 commands['lepton-eda'] = 'lepton-cli'
219 commands['ngspice'] = 'ngspice'
220 if system != "Linux":
221 commands['kicad'] = '/Applications/KiCad/KiCad.app/Contents/MacOS/kicad-cli'
222 for key in commands.keys():
223 if key != "ltspice":
224 cmd = "which " + commands[key]
225 found = os.system(cmd)
226 if found == 256:
227 commands[key] = ""
228 if system != 'Windows' and commands['lepton-eda'] != '':
229 commands['geda'] = 'lepton-netlist'
230 # print not installed packages
231 not_installed = []
232 for key in commands.keys():
233 if commands[key] == '':
234 not_installed.append(key)
235 if len(not_installed) > 0:
236 print("The following apps have not been installed:")
237 for app in not_installed:
238 print("-", app)
239 print("After installation of missing apps, delete the '~/SLiCAP.ini' " +
240 "file. It will be recreated with the next SLiCAP import.")
241 return commands
242
243def _generate_project_config():
244 project_paths = {"html" : 'html/',

Callers 1

_generate_main_configFunction · 0.85

Calls 1

_find_LTspice_wineFunction · 0.85

Tested by

no test coverage detected