+ venv_directory_path = None
+ if "venv_directory_path" in _config:
+ venv_directory_path = _config["venv_directory_path"]
+ venv_bin_directory_path = os.path.join(venv_directory_path, 'bin')
+ venv_pip_executable = os.path.join(venv_bin_directory_path, 'pip')
+ venv_python_executable = os.path.join(venv_bin_directory_path, 'python')
+ if os.path.isdir(venv_directory_path) and os.path.isfile(venv_pip_executable):
+ requirement_file = os.path.join(home_dir, 'requirements.txt')
+ with open(requirement_file, 'w') as fd:
+ subprocess.call([venv_python_executable, '-m', 'pip', 'freeze'], stdout=fd)
+ else:
+ venv_directory_path = None
+