MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / install_pkg_if_necessary

Function install_pkg_if_necessary

scripts/check_modules.py:250–257  ·  view source on GitHub ↗
(pkg_name, required_version)

Source from the content-addressed store, hash-verified

248
249
250def install_pkg_if_necessary(pkg_name, required_version):
251 if os.path.exists(f"src/{pkg_name}"):
252 print(f"Skipping {pkg_name} update, since it's in developer/editable mode")
253 return
254
255 pkg_version = version(pkg_name)
256 if pkg_version != required_version:
257 _install(pkg_name, required_version)
258
259
260def version_str_to_tuple(ver_str):

Callers 1

update_modulesFunction · 0.85

Calls 2

_installFunction · 0.85
versionFunction · 0.70

Tested by

no test coverage detected