MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / lock_requirements

Function lock_requirements

etc/scripts/utils_requirements.py:81–87  ·  view source on GitHub ↗

Freeze and lock current installed requirements and save this to the `requirements_file` requirements file.

(requirements_file="requirements.txt", site_packages_dir=None)

Source from the content-addressed store, hash-verified

79
80
81def lock_requirements(requirements_file="requirements.txt", site_packages_dir=None):
82 """
83 Freeze and lock current installed requirements and save this to the
84 `requirements_file` requirements file.
85 """
86 with open(requirements_file, "w") as fo:
87 fo.write(get_installed_reqs(site_packages_dir=site_packages_dir))
88
89
90def lock_dev_requirements(

Callers

nothing calls this directly

Calls 2

get_installed_reqsFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected